diff options
author | Andreas Gohr <andi@splitbrain.org> | 2008-02-23 14:08:27 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2008-02-23 14:08:27 +0100 |
commit | 9e54d51a8ebde607c4085bdbad48b04e09e356d8 (patch) | |
tree | f54cd718578ca8f8eb546d917dc24390943b0af4 /inc/auth/mysql.class.php | |
parent | 1ed565609c9058b80c9936f5a6e8e24bd27de18f (diff) | |
download | rpg-9e54d51a8ebde607c4085bdbad48b04e09e356d8.tar.gz rpg-9e54d51a8ebde607c4085bdbad48b04e09e356d8.tar.bz2 |
mysql auth backend: check DB query result correctly FS#1039
darcs-hash:20080223130827-7ad00-3c9ba32b002a34548df1696a26bd92616e763ccc.gz
Diffstat (limited to 'inc/auth/mysql.class.php')
-rw-r--r-- | inc/auth/mysql.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index 9bb9fa1df..ebc3df902 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -489,7 +489,7 @@ class auth_mysql extends auth_basic { $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getGroups']); $result = $this->_queryDB($sql); - if(count($result)) { + if($result !== false && count($result)) { foreach($result as $row) $groups[] = $row['group']; } @@ -610,7 +610,7 @@ class auth_mysql extends auth_basic { function _getUserInfo($user){ $sql = str_replace('%{user}',$this->_escape($user),$this->cnf['getUserInfo']); $result = $this->_queryDB($sql); - if(count($result)) { + if($result !== false && count($result)) { $info = $result[0]; $info['grps'] = $this->_getGroups($user); return $info; |