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
path: root/apps
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2022-05-05 12:21:20 +0300
committerLouis Chemineau <louis@chmn.me>2022-05-05 18:21:23 +0300
commit8a2cf5bb68617004d24469c65b68e8b01ca56621 (patch)
tree58cb1836b328b159be549f5759245db9fbf1f6d5 /apps
parentd3efd40a24be45a2a38a904c111d10fa4de01f81 (diff)
Do not dispatch postSetPassword when setPassword fails
Also Improve error message when setPassword fails Signed-off-by: Louis Chemineau <louis@chmn.me>
Diffstat (limited to 'apps')
-rw-r--r--apps/settings/lib/Controller/ChangePasswordController.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/settings/lib/Controller/ChangePasswordController.php b/apps/settings/lib/Controller/ChangePasswordController.php
index 8dd1e6ba028..85e4218ebb5 100644
--- a/apps/settings/lib/Controller/ChangePasswordController.php
+++ b/apps/settings/lib/Controller/ChangePasswordController.php
@@ -109,7 +109,10 @@ class ChangePasswordController extends Controller {
try {
if ($newpassword === null || $user->setPassword($newpassword) === false) {
return new JSONResponse([
- 'status' => 'error'
+ 'status' => 'error',
+ 'data' => [
+ 'message' => $this->l->t('Unable to change personal password'),
+ ],
]);
}
// password policy app throws exception