From af9998591ecb202720ffcc8526a4e21259b0ad3e Mon Sep 17 00:00:00 2001 From: Joshua Sherman Date: Sat, 28 Dec 2013 13:56:48 -0500 Subject: [PATCH] No error when password was bad Caused a weird refresh, not ideal. --- modules/user/authenticate.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/user/authenticate.php b/modules/user/authenticate.php index 6c6363a..c1b8f1b 100644 --- a/modules/user/authenticate.php +++ b/modules/user/authenticate.php @@ -26,9 +26,8 @@ class user_authenticate extends AnonymousModule if ($user['password'] == crypt($_POST['password'], $user['password'])) { setcookie('__auth', base64_encode($uid . '|' . $user['auth']), time() + Time::YEAR, '/'); + return array('status' => 'success', 'url' => '/leaderboards'); } - - return array('status' => 'success', 'url' => '/leaderboards'); } return array('error' => 'Invalid email address or password.');