Skip to content
Snippets Groups Projects
Commit 50d0f48e authored by Arthur Schiwon's avatar Arthur Schiwon
Browse files

LDAP: check whether user exists for before trying to determine displayname

parent 18fccf66
No related branches found
No related tags found
No related merge requests found
......@@ -217,6 +217,10 @@ class USER_LDAP extends lib\Access implements \OCP\UserInterface {
* @return display name
*/
public function getDisplayName($uid) {
if(!$this->userExists($uid)) {
return false;
}
$cacheKey = 'getDisplayName'.$uid;
if(!is_null($displayName = $this->connection->getFromCache($cacheKey))) {
return $displayName;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment