forward error message from password policy

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2019-01-07 16:28:06 +01:00
parent 8508e296e3
commit 3991aa0166
No known key found for this signature in database
GPG Key ID: 42B69D8A64526EFB
1 changed files with 5 additions and 1 deletions

View File

@ -512,7 +512,11 @@ class UsersController extends AUserData {
$targetUser->setQuota($quota); $targetUser->setQuota($quota);
break; break;
case 'password': case 'password':
try {
$targetUser->setPassword($value); $targetUser->setPassword($value);
} catch (HintException $e) { // password policy error
throw new OCSException($e->getMessage(), 103);
}
break; break;
case 'language': case 'language':
$languagesCodes = $this->l10nFactory->findAvailableLanguages(); $languagesCodes = $this->l10nFactory->findAvailableLanguages();