error handling in update profile from LDAP

added error message on InvalidArgumentException

Signed-off-by: Marc Hefter <marchefter@gmail.com>
This commit is contained in:
Marc Hefter 2023-04-11 16:40:00 +02:00
parent ebb0c53f9e
commit eec5e702da
No known key found for this signature in database
GPG key ID: AC45BA6A849F8610

View file

@ -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]);
}
}
/**