[Web] Disallow web UI login, when domain is disabled

master
andryyy 2020-05-17 09:41:38 +02:00
parent 18ba4d2c9c
commit e824239dee
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 3 additions and 1 deletions

View File

@ -579,8 +579,10 @@ function check_login($user, $pass) {
}
}
$stmt = $pdo->prepare("SELECT `password` FROM `mailbox`
INNER JOIN domain on mailbox.domain = domain.domain
WHERE `kind` NOT REGEXP 'location|thing|group'
AND `active`='1'
AND `mailbox`.`active`='1'
AND `domain`.`active`='1'
AND `username` = :user");
$stmt->execute(array(':user' => $user));
$rows = $stmt->fetchAll(PDO::FETCH_ASSOC);