Skip to content
Snippets Groups Projects
Commit dda5e6c8 authored by Morris Jobke's avatar Morris Jobke
Browse files

add proper Exception message for invalid token

parent 1cb7239c
No related branches found
No related tags found
No related merge requests found
......@@ -106,8 +106,11 @@ class LostController extends Controller {
try {
$user = $this->userManager->get($userId);
if (!$this->checkToken($userId, $token) ||
!$user->setPassword($userId, $password)) {
if (!$this->checkToken($userId, $token)) {
throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid'));
}
if (!$user->setPassword($userId, $password)) {
throw new \Exception();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment