diff options
author | Joas Schilling <coding@schilljs.com> | 2020-12-02 16:03:08 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-12-07 14:19:38 +0100 |
commit | 9e04e6f99ad7a8d78b0bf09a414ed0f1aac3e5db (patch) | |
tree | e79332d8dcff97d096dc3513426964294bae89f0 /apps/provisioning_api | |
parent | fe9c46e595cba2d8e52db13cf15848a1f9d6f141 (diff) | |
download | nextcloud-server-9e04e6f99ad7a8d78b0bf09a414ed0f1aac3e5db.tar.gz nextcloud-server-9e04e6f99ad7a8d78b0bf09a414ed0f1aac3e5db.zip |
Also translate the phone number when coming in via the accounts manager API directly
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/provisioning_api')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index 08c541ffa6c..edb1fc5121a 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -654,7 +654,11 @@ class UsersController extends AUserData { $userAccount = $this->accountManager->getUser($targetUser); if ($userAccount[$key]['value'] !== $value) { $userAccount[$key]['value'] = $value; - $this->accountManager->updateUser($targetUser, $userAccount); + try { + $this->accountManager->updateUser($targetUser, $userAccount); + } catch (\InvalidArgumentException $e) { + throw new OCSException('Invalid ' . $e->getMessage(), 102); + } } break; default: |