summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-03-15 16:25:49 +0100
committeremkael <emkael@tlen.pl>2017-03-15 16:47:25 +0100
commit941b30311835fa020dc97fdcc3503d9b588fb5d5 (patch)
treeb653c01b5289485d049475c0a24c7a63bd670077
parent40da59a0c5f9fa2f1cf840bc64161861ef6a818f (diff)
* allow login only for active users
-rw-r--r--app/frontend/user/DbUser.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/frontend/user/DbUser.php b/app/frontend/user/DbUser.php
index 3fc9b80..55dcf05 100644
--- a/app/frontend/user/DbUser.php
+++ b/app/frontend/user/DbUser.php
@@ -46,6 +46,9 @@ class DbUser extends TDbUser {
public function validateUser($login, $password) {
$user = UserFacade::getInstance()->findByLogin($login);
+ if (!($user && $user->IsActive)) {
+ return FALSE;
+ }
$dbPassword = $user ? $user->Password : '';
if (UserFacade::getInstance()->verifyPassword($password, $dbPassword)
&& $user) {