]> source.dussan.org Git - nextcloud-server.git/commitdiff
null users dont exist 5711/head
authorRobin Appelman <robin@icewind.nl>
Thu, 13 Jul 2017 12:33:46 +0000 (14:33 +0200)
committerRobin Appelman <robin@icewind.nl>
Thu, 13 Jul 2017 13:54:16 +0000 (15:54 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/User/Manager.php

index c04f426c2cf6e33de82c6586cfd844dd95d6c9b0..ded807a223ba22abff5075fca23d00aa3e0edc7f 100644 (file)
@@ -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];
                }