diff options
author | Robin Appelman <robin@icewind.nl> | 2019-01-07 16:28:06 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2019-01-07 16:28:06 +0100 |
commit | 3991aa01662484012887b89fc12ded2650c1c8d7 (patch) | |
tree | 638a7b2e0838c2008fc249d7206b91ea27261b5a /apps/provisioning_api/lib | |
parent | 8508e296e38852a612816d07b954c3b0308028d8 (diff) | |
download | nextcloud-server-3991aa01662484012887b89fc12ded2650c1c8d7.tar.gz nextcloud-server-3991aa01662484012887b89fc12ded2650c1c8d7.zip |
forward error message from password policy
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/provisioning_api/lib')
-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 27d66a83c81..e710cf6c668 100644 --- a/apps/provisioning_api/lib/Controller/UsersController.php +++ b/apps/provisioning_api/lib/Controller/UsersController.php @@ -512,7 +512,11 @@ class UsersController extends AUserData { $targetUser->setQuota($quota); break; case 'password': - $targetUser->setPassword($value); + try { + $targetUser->setPassword($value); + } catch (HintException $e) { // password policy error + throw new OCSException($e->getMessage(), 103); + } break; case 'language': $languagesCodes = $this->l10nFactory->findAvailableLanguages(); |