add proper Exception message for invalid token

This commit is contained in:
Morris Jobke 2014-06-13 16:18:58 +02:00
parent 1cb7239cb7
commit dda5e6c85b
1 changed files with 5 additions and 2 deletions

View File

@ -106,8 +106,11 @@ class LostController extends Controller {
try { try {
$user = $this->userManager->get($userId); $user = $this->userManager->get($userId);
if (!$this->checkToken($userId, $token) || if (!$this->checkToken($userId, $token)) {
!$user->setPassword($userId, $password)) { throw new \Exception($this->l10n->t('Couldn\'t reset password because the token is invalid'));
}
if (!$user->setPassword($userId, $password)) {
throw new \Exception(); throw new \Exception();
} }