Fix password reset issues

This commit is contained in:
Deon George
2013-04-18 18:17:33 +10:00
parent 6cb3e55ca9
commit 13982be9f6
14 changed files with 99 additions and 69 deletions

View File

@@ -18,10 +18,8 @@ class Controller_Login extends lnApp_Controller_Login {
*/
public function action_register() {
// If user already signed-in
if (Auth::instance()->logged_in()!= 0) {
// Redirect to the user account
if (Auth::instance()->logged_in())
HTTP::redirect('welcome/index');
}
HTTP::redirect('login');
}
@@ -34,10 +32,8 @@ class Controller_Login extends lnApp_Controller_Login {
$token_expire = 15;
// If user already signed-in
if (Auth::instance()->logged_in()!= 0) {
// Redirect to the user account
if (Auth::instance()->logged_in())
HTTP::redirect('welcome/index');
}
// If the user posted their details to reset their password
if ($_POST) {
@@ -71,7 +67,7 @@ class Controller_Login extends lnApp_Controller_Login {
// Redirect to our password reset, the Auth will validate the token.
} elseif (! empty($_REQUEST['token'])) {
HTTP::redirect(URL::link('user','account/resetpassword?token=%s'.$_REQUEST['token']));
HTTP::redirect(URL::link('user','account/resetpassword?token='.$_REQUEST['token']));
}
// Show our token screen even if the email was invalid.