summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/auth/mysql.class.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php
index f0dde6ae0..6d79c5430 100644
--- a/inc/auth/mysql.class.php
+++ b/inc/auth/mysql.class.php
@@ -67,9 +67,12 @@ class auth_mysql extends auth_basic {
$sql = str_replace('%g',addslashes($this->defaultgroup),$sql);
$result = $this->queryDB($sql);
- if($result !== false && count($result) == 1)
- $rc = $cnf['encryptPass'] ? true : auth_verifyPassword($pass,$result[0]['pass']);
-
+ if($result !== false && count($result) == 1) {
+ if($this->cnf['encryptPass'] == 1)
+ $rc = true;
+ else
+ $rc = auth_verifyPassword($pass,$result[0]['pass']);
+ }
$this->closeDB();
}
return $rc;