diff options
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); } |