Fix null pointer exception in user_ldap

This commit is contained in:
Jörn Friedrich Dreyer 2016-06-10 16:40:44 +02:00 committed by Thomas Müller
parent 826654bb70
commit 11c1d399af
No known key found for this signature in database
GPG Key ID: A943788A3BBEC44C
1 changed files with 8 additions and 1 deletions

View File

@ -730,7 +730,14 @@ class Access extends LDAPUtility implements user\IUserTools {
$user->unmark();
$user = $this->userManager->get($ocName);
}
$user->processAttributes($userRecord);
if ($user !== null) {
$user->processAttributes($userRecord);
} else {
\OC::$server->getLogger()->debug(
"The ldap user manager returned null for $ocName",
['app'=>'user_ldap']
);
}
}
}