Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2019-01-30 13:12:02 +0300
committerGitHub <noreply@github.com>2019-01-30 13:12:02 +0300
commit95d1cf4817a8b21decbcd844bf67413572014420 (patch)
tree2d4684cf009112b5c720b07b36e68747d0c3e7ab /apps/provisioning_api
parent53fd4997cc4abfbff35276e7b02be1eeca068a41 (diff)
parent3991aa01662484012887b89fc12ded2650c1c8d7 (diff)
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.php6
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();