Skip to content
Snippets Groups Projects
Commit e71b9fb3 authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

Merge pull request #5709 from nextcloud/null-user-exist

null users dont exist
parents 1ac6eae7 5185a3c0
No related branches found
No related tags found
No related merge requests found
......@@ -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];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment