diff options
author | Marc Hefter <marchefter@gmail.com> | 2023-04-11 16:40:00 +0200 |
---|---|---|
committer | Marc Hefter <marchefter@gmail.com> | 2023-04-11 16:40:00 +0200 |
commit | eec5e702da5ce7e6a65adb56ad611aee4c97f718 (patch) | |
tree | f841c7053c5abc2018320409e0c98ab7af3720d0 | |
parent | ebb0c53f9e271cc0036c5f5c8d6316722a78b33c (diff) | |
download | nextcloud-server-eec5e702da5ce7e6a65adb56ad611aee4c97f718.tar.gz nextcloud-server-eec5e702da5ce7e6a65adb56ad611aee4c97f718.zip |
error handling in update profile from LDAP
added error message on InvalidArgumentException
Signed-off-by: Marc Hefter <marchefter@gmail.com>
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index f6a2d037ea7..8685ba0c60a 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -645,7 +645,13 @@ class User { .' for uid='.$this->uid.'', ['app' => 'user_ldap']); } } - $accountManager->updateAccount($account); // may throw InvalidArgumentException + try { + $accountManager->updateAccount($account); // may throw InvalidArgumentException + } catch (\InvalidArgumentException $e) { + $this->logger->error('invalid data from LDAP: for uid='.$this->uid.'' + , ['app' => 'user_ldap', 'func' => 'updateProfile' + , 'exception' => $e]); + } } /** |