user ids are strings

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-03-30 12:24:46 +02:00
parent dc4b983639
commit 0aeb595784
No known key found for this signature in database
GPG Key ID: 50F2B59C6DEBBCFE
1 changed files with 2 additions and 1 deletions

View File

@ -237,9 +237,10 @@ class Database extends Backend implements IUserBackend {
* @return boolean true if user was found, false otherwise
*/
private function loadUser($uid) {
$uid = (string) $uid;
if (!isset($this->cache[$uid])) {
//guests $uid could be NULL or ''
if ($uid === null || $uid === '') {
if ($uid === '') {
$this->cache[$uid]=false;
return true;
}