diff options
author | Joas Schilling <coding@schilljs.com> | 2017-07-18 18:24:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-18 18:24:42 +0200 |
commit | e71b9fb3d6637dcec6d157e6e61bd391222c44fe (patch) | |
tree | 37a9ccd47026d1a062f91a1b58d37da1c9e84949 /lib | |
parent | 1ac6eae7d55c9c9530a55e643e39879e8ae816c2 (diff) | |
parent | 5185a3c0c957bc01f159118a32a0a4aaf1f23532 (diff) | |
download | nextcloud-server-e71b9fb3d6637dcec6d157e6e61bd391222c44fe.tar.gz nextcloud-server-e71b9fb3d6637dcec6d157e6e61bd391222c44fe.zip |
Merge pull request #5709 from nextcloud/null-user-exist
null users dont exist
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/User/Manager.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index c04f426c2cf..ded807a223b 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]; } |