mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
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
2 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue