diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2019-01-30 11:12:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-30 11:12:02 +0100 |
commit | 95d1cf4817a8b21decbcd844bf67413572014420 (patch) | |
tree | 2d4684cf009112b5c720b07b36e68747d0c3e7ab /apps/provisioning_api | |
parent | 53fd4997cc4abfbff35276e7b02be1eeca068a41 (diff) | |
parent | 3991aa01662484012887b89fc12ded2650c1c8d7 (diff) | |
download | nextcloud-server-95d1cf4817a8b21decbcd844bf67413572014420.tar.gz nextcloud-server-95d1cf4817a8b21decbcd844bf67413572014420.zip |
Merge pull request #13412 from nextcloud/forward-password-policy
forward error message from password policy
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 ac1cfe989fd..a034ff6d77a 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(); |