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:
Thomas Müller 2016-01-06 17:04:16 +01:00
commit 8b5315c90a
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];