Make LDAP more robust to exceptions and log them properly
This commit is contained in:
parent
12b0e9e3bd
commit
553a981980
|
@ -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