From 5185a3c0c957bc01f159118a32a0a4aaf1f23532 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 13 Jul 2017 14:33:46 +0200 Subject: [PATCH] null users dont exist Signed-off-by: Robin Appelman --- lib/private/User/Manager.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index c04f426c2c..ded807a223 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -126,6 +126,9 @@ class Manager extends PublicEmitter implements IUserManager { * @return \OC\User\User|null Either the user or null if the specified user does not exist */ public function get($uid) { + if (is_null($uid) || $uid === '' || $uid === false) { + return null; + } if (isset($this->cachedUsers[$uid])) { //check the cache first to prevent having to loop over the backends return $this->cachedUsers[$uid]; }