diff options
-rw-r--r-- | inc/auth/mysql.class.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/inc/auth/mysql.class.php b/inc/auth/mysql.class.php index da89dd845..aea11d35f 100644 --- a/inc/auth/mysql.class.php +++ b/inc/auth/mysql.class.php @@ -342,9 +342,11 @@ class auth_mysql extends auth_basic { $sql .= " ".$this->cnf['SortOrder']." LIMIT $first, $limit"; $result = $this->_queryDB($sql); - foreach ($result as $user) - if (($info = $this->_getUserInfo($user['user']))) - $out[$user['user']] = $info; + if (!empty($result)) { + foreach ($result as $user) + if (($info = $this->_getUserInfo($user['user']))) + $out[$user['user']] = $info; + } $this->_unlockTables(); $this->_closeDB(); |