Merge pull request #13921 from nextcloud/backport/13412/stable14
[stable14] forward error message from password policy
This commit is contained in:
commit
257f9c4a4b
|
@ -512,7 +512,11 @@ class UsersController extends AUserData {
|
||||||
$targetUser->setQuota($quota);
|
$targetUser->setQuota($quota);
|
||||||
break;
|
break;
|
||||||
case 'password':
|
case 'password':
|
||||||
$targetUser->setPassword($value);
|
try {
|
||||||
|
$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();
|
||||||
|
|
Loading…
Reference in New Issue