diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-11-02 21:44:36 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-11-02 21:44:36 +0000 |
| commit | 5b73ad4cbd8c83f1fd5cc5713836e15caff8a045 (patch) | |
| tree | ee77539d391a5795c28665af8a8cf3291f137577 /phpBB/login.php | |
| parent | 97978b69f17bb8dc19bbc59922a8ba165d976e5c (diff) | |
| download | forums-5b73ad4cbd8c83f1fd5cc5713836e15caff8a045.tar forums-5b73ad4cbd8c83f1fd5cc5713836e15caff8a045.tar.gz forums-5b73ad4cbd8c83f1fd5cc5713836e15caff8a045.tar.bz2 forums-5b73ad4cbd8c83f1fd5cc5713836e15caff8a045.tar.xz forums-5b73ad4cbd8c83f1fd5cc5713836e15caff8a045.zip | |
Fix autologin issues
git-svn-id: file:///svn/phpbb/trunk@3006 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/login.php')
| -rw-r--r-- | phpBB/login.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/phpBB/login.php b/phpBB/login.php index 3c494cf8f6..c8b18c859a 100644 --- a/phpBB/login.php +++ b/phpBB/login.php @@ -38,21 +38,21 @@ extract($_POST); $redirect = (!empty($redirect)) ? $_SERVER['QUERY_STRING'] : ''; // Do the login/logout/form/whatever -if ( isset($login) || isset($logout) ) +if (isset($login) || isset($logout)) { - if ( isset($login) && !$user->data['user_id'] ) + if (isset($login) && !$user->data['user_id']) { - $autologin = ( !empty($autologin) ) ? true : false; + $autologin = (!empty($autologin)) ? true : false; // // Is the board disabled? Are we an admin? No, then back to the index we go // - if ( $config['board_disable'] && !$auth->acl_get('a_') ) + if ($config['board_disable'] && !$auth->acl_get('a_')) { redirect("index.$phpEx$SID"); } - if ( !$auth->login($username, $password, $autologin) ) + if (!$auth->login($username, $password, $autologin)) { $template->assign_vars(array( 'META' => '<meta http-equiv="refresh" content="3;url=' . "login.$phpEx$SID&redirect=$redirect" . '">') @@ -62,7 +62,7 @@ if ( isset($login) || isset($logout) ) message_die(MESSAGE, $message); } } - else if ( $user->data['user_id'] ) + else if ($user->data['user_id'] != ANONYMOUS) { $user->destroy(); } @@ -70,7 +70,7 @@ if ( isset($login) || isset($logout) ) // // Redirect to wherever we're supposed to go ... // - $redirect_url = ( $redirect ) ? preg_replace('/^.*?redirect=(.*?)&(.*?)$/', '\\1' . $SID . '&\\2', $redirect) : 'index.'.$phpEx; + $redirect_url = ($redirect) ? preg_replace('/^.*?redirect=(.*?)&(.*?)$/', '\\1' . $SID . '&\\2', $redirect) : 'index.'.$phpEx; redirect($redirect_url); } |
