diff options
author | andi <andi@splitbrain.org> | 2005-04-13 20:00:07 +0200 |
---|---|---|
committer | andi <andi@splitbrain.org> | 2005-04-13 20:00:07 +0200 |
commit | ee30ffda01e0188f6353b8f08ac11bc97e8e3330 (patch) | |
tree | 27697a3fdcb8bd7da3e068ae1a8ef8c19d9f2973 | |
parent | 340756e4d13bbcffbd9cba79aef7fc7a6ca2ecb8 (diff) | |
download | rpg-ee30ffda01e0188f6353b8f08ac11bc97e8e3330.tar.gz rpg-ee30ffda01e0188f6353b8f08ac11bc97e8e3330.tar.bz2 |
small mysql_auth fix
darcs-hash:20050413180007-9977f-775116032aa4bda171b7585209a163de74ef45cb.gz
-rw-r--r-- | inc/auth_mysql.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/inc/auth_mysql.php b/inc/auth_mysql.php index 483ee5511..a4fafec3b 100644 --- a/inc/auth_mysql.php +++ b/inc/auth_mysql.php @@ -93,9 +93,12 @@ function auth_getUserData($user){ $sql = str_replace('%u',addslashes($user),$cnf['groups']); $result = auth_mysql_runsql($sql); - if(!count($result)) return false; - foreach($result as $row){ - $info['grps'][] = $row['group']; + if(!count($result)){ + $info['grps'][] = $conf['defaultgroup']; + }else{ + foreach($result as $row){ + $info['grps'][] = $row['group']; + } } return $info; |