Merge pull request #21459 from owncloud/make-ldap-more-robust
Make LDAP more robust to exceptions and log them properly
This commit is contained in:
commit
8b5315c90a
|
@ -474,8 +474,8 @@ class User {
|
|||
$this->fs->setup($this->uid);
|
||||
}
|
||||
|
||||
$avatar = $this->avatarManager->getAvatar($this->uid);
|
||||
try {
|
||||
$avatar = $this->avatarManager->getAvatar($this->uid);
|
||||
$avatar->set($this->image);
|
||||
} catch (\Exception $e) {
|
||||
\OC::$server->getLogger()->notice(
|
||||
|
|
|
@ -118,6 +118,7 @@ class USER_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn
|
|||
try {
|
||||
$ldapRecord = $this->getLDAPUserByLoginName($uid);
|
||||
} catch(\Exception $e) {
|
||||
\OC::$server->getLogger()->logException($e, ['app' => 'user_ldap']);
|
||||
return false;
|
||||
}
|
||||
$dn = $ldapRecord['dn'][0];
|
||||
|
|
Loading…
Reference in New Issue