diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-30 00:26:23 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-30 00:48:05 +0200 |
commit | a0752543d843fc438c03b0c72e3872c9ea1175e1 (patch) | |
tree | 88d6716f0a38b9763e5172731cea525153de9554 /apps/provisioning_api/lib/Controller/UsersController.php | |
parent | 00ffad3c6065bc34bc4bde1a80f1a33658da3094 (diff) | |
download | nextcloud-server-a0752543d843fc438c03b0c72e3872c9ea1175e1.tar.gz nextcloud-server-a0752543d843fc438c03b0c72e3872c9ea1175e1.zip |
fix small issues in UsersController handling
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'apps/provisioning_api/lib/Controller/UsersController.php')
-rw-r--r-- | apps/provisioning_api/lib/Controller/UsersController.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/provisioning_api/lib/Controller/UsersController.php b/apps/provisioning_api/lib/Controller/UsersController.php index f5993e3aa5c..b81801aba28 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -673,8 +673,12 @@ class UsersController extends AUserData { } } if ($targetProperty instanceof IAccountProperty) { - $targetProperty->setScope($value); - $this->accountManager->updateAccount($userAccount); + try { + $targetProperty->setScope($value); + $this->accountManager->updateAccount($userAccount); + } catch (\InvalidArgumentException $e) { + throw new OCSException('', 102); + } } else { throw new OCSException('', 102); } |