fix: [users:change_pw] Return error message when trying to use the same

password. Fix #5961
pull/5973/head
mokaddem 2020-06-03 15:05:09 +02:00
parent 84b4f7fd7c
commit 41506cc7e7
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 1 deletions

View File

@ -306,7 +306,11 @@ class UsersController extends AppController
$this->Flash->error($message);
}
} else {
$this->Flash->error($message);
if ($this->_isRest()) {
return $this->RestResponse->saveFailResponse('Users', 'change_pw', false, $message, $this->response->type());
} else {
$this->Flash->error($message);
}
}
}
if ($this->_isRest()) {