diff options
author | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2006-01-07 12:46:35 +0100 |
---|---|---|
committer | matthiasgrimm <matthiasgrimm@users.sourceforge.net> | 2006-01-07 12:46:35 +0100 |
commit | f26243a69d275a0fcd05bc337b1bc82b438d5367 (patch) | |
tree | c3d8ec0167a47ae4e1c493239a3aa630a39c5505 | |
parent | e8dfb12925642c24ff59441b710012ffb2114c6a (diff) | |
download | rpg-f26243a69d275a0fcd05bc337b1bc82b438d5367.tar.gz rpg-f26243a69d275a0fcd05bc337b1bc82b438d5367.tar.bz2 |
mysql class password encryption bugfix
A syntax error in the checkpass() function prevented the module
from using password encryption by the database. It always did the
password encryption by itself - fixed.
darcs-hash:20060107114635-7ef76-0eeee13b57844097e83f14d85372502e6b1ce10e.gz
-rw-r--r-- | inc/auth/mysql.class.php | 9 |
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; |