aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Hefter <marchefter@gmail.com>2023-04-11 16:40:00 +0200
committerMarc Hefter <marchefter@gmail.com>2023-04-11 16:40:00 +0200
commiteec5e702da5ce7e6a65adb56ad611aee4c97f718 (patch)
treef841c7053c5abc2018320409e0c98ab7af3720d0
parentebb0c53f9e271cc0036c5f5c8d6316722a78b33c (diff)
downloadnextcloud-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.php8
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]);
+ }
}
/**