From 1d0e4ee436cf7ca5790d83aac11ed9cf90a4ccda Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 8 Oct 2002 20:11:59 +0000 Subject: Permission related updates ... is still not final but is getting there ... faster than British Rail too git-svn-id: file:///svn/phpbb/trunk@2943 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/login.php | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'phpBB/login.php') diff --git a/phpBB/login.php b/phpBB/login.php index b1c3a9f952..b6f9e54554 100644 --- a/phpBB/login.php +++ b/phpBB/login.php @@ -26,16 +26,11 @@ $phpbb_root_path = './'; include($phpbb_root_path . 'extension.inc'); include($phpbb_root_path . 'common.'.$phpEx); -// // Set page ID for session management -// $userdata = $session->start(); $auth = new auth($userdata); - -$session->configure($userdata); -// +$user = new user($userdata); // End session management -// // // This appears to work for IIS5 CGI under Win2K. Uses getenv since this doesn't exist for @@ -43,24 +38,22 @@ $session->configure($userdata); // $header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: '; -extract($HTTP_GET_VARS); -extract($HTTP_POST_VARS); +extract($_GET); +extract($_POST); -$redirect = ( !empty($redirect) ) ? $HTTP_SERVER_VARS['QUERY_STRING'] : ''; +$redirect = ( !empty($redirect) ) ? $_SERVER['QUERY_STRING'] : ''; -// // Do the login/logout/form/whatever -// if ( isset($login) || isset($logout) ) { - if ( isset($login) && $userdata['user_id'] == ANONYMOUS ) + if ( isset($login) && !$userdata['user_id'] ) { $autologin = ( !empty($autologin) ) ? true : false; // // Is the board disabled? Are we an admin? No, then back to the index we go // - if ( $board_config['board_disable'] && !$auth->get_acl_admin() ) + if ( $board_config['board_disable'] && !$auth->acl_get('a_') ) { header($header_location . "index.$phpEx$SID"); exit; @@ -76,7 +69,7 @@ if ( isset($login) || isset($logout) ) message_die(MESSAGE, $message); } } - else if ( $userdata['user_id'] != ANONYMOUS ) + else if ( $userdata['user_id'] ) { $session->destroy($userdata); } @@ -89,7 +82,7 @@ if ( isset($login) || isset($logout) ) exit; } -if ( $userdata['user_id'] == ANONYMOUS ) +if ( !$userdata['user_id'] ) { $template->assign_vars(array( 'L_ENTER_PASSWORD' => $lang['Enter_password'], -- cgit v1.2.1