Skip to content

Commit

Permalink
Fixed a Bug in statistics forum
Browse files Browse the repository at this point in the history
  • Loading branch information
Xeta committed May 27, 2015
1 parent 32684e5 commit 2146218
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/Controller/UsersController.php
Expand Up @@ -483,10 +483,10 @@ public function forgotPassword()

return;
}

//Generate the unique code
$code = md5(rand() . uniqid() . time());

//Update the user's information
$user->password_code = $code;
$user->password_code_expire = new Time();
Expand All @@ -509,7 +509,7 @@ public function forgotPassword()
->subject(__('Forgot your Password - Xeta'))
->viewVars($viewVars)
->send();

$this->Flash->success(__("An E-mail has been send to <strong>{0}</strong>. Please follow the instructions in the E-mail.", h($user->email)));
}

Expand Down Expand Up @@ -549,7 +549,7 @@ public function resetPassword()
}

$expire = $user->password_code_expire->timestamp + (Configure::read('User.ResetPassword.expire_code') * 60);

if ($expire < time()) {
$this->Flash->error(__("This code is expired, please ask another E-mail code."));

Expand All @@ -567,7 +567,7 @@ public function resetPassword()
$user->password_code_expire = new Time();
$user->password_reset_count = $user->password_reset_count + 1;
$this->Users->save($user);

return $this->redirect(['controller' => 'users', 'action' => 'login']);
}
}
Expand Down
2 changes: 1 addition & 1 deletion webroot/css/xeta.css

Large diffs are not rendered by default.

0 comments on commit 2146218

Please sign in to comment.