diff --git a/auth.php b/auth.php index aab3985..4035e58 100644 --- a/auth.php +++ b/auth.php @@ -277,6 +277,11 @@ public function getUserData($user, $requireGroups = true) { return false; } $row = $result->fetch(PDO::FETCH_ASSOC); + if ($row === false) { + $this->dbglog('user not found: ' . $user); + $result->closeCursor(); + return false; + } $this->_phpbb_user_type = (int)$row['user_type']; $this->_phpbb_user_id = (int)$row['user_id']; $this->_phpbb_username = $row['username']; @@ -588,7 +593,8 @@ private function use_phpbb_cache() { */ private function phpbb_connect() { if (!$this->_phpbb_db_link) { - $host = strtolower(end(explode('\\', $this->_phpbb_conf['dbms']))); + $exploded = explode('\\', $this->_phpbb_conf['dbms']); + $host = strtolower(end($exploded)); $port = ''; $dsn = '';