Merge pull request #13412 from nextcloud/forward-password-policy
forward error message from password policy
This commit is contained in:
commit
95d1cf4817
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue