Merge pull request #25197 from owncloud/fix-npe-in-user-ldap-stable9

[stable9] Fix null pointer exception in user_ldap
This commit is contained in:
Vincent Petry 2016-06-21 16:10:48 +02:00 committed by GitHub
commit 54209abb74
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']
);
}
}
}