Make LDAP more robust to exceptions and log them properly

This commit is contained in:
Morris Jobke 2016-01-05 11:41:06 +01:00
parent 12b0e9e3bd
commit 553a981980
2 changed files with 2 additions and 1 deletions

View File

@ -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(

View File

@ -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];