1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-24 13:16:16 +02:00

Updates for permissions, sessions, lots of things ... note that _many_ things _do_not_work_ now ... I'm commiting them to stop people complaining about my holding on to everything :) There is _no_ update script at present for all these changes, you'll have to work out what's needed yourselves till I finish various things

git-svn-id: file:///svn/phpbb/trunk@2673 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen
2002-07-14 14:45:26 +00:00
parent d03de47b51
commit 4bc4397f4a
14 changed files with 1317 additions and 1797 deletions

View File

@@ -28,12 +28,17 @@ include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_PROFILE);
init_userprefs($userdata);
$userdata = $session->start();
$acl = new auth('list', $userdata);
//
// End session management
//
//
// Configure style, language, etc.
//
$session->configure($userdata);
//
// Set default email variables
//
@@ -81,10 +86,16 @@ if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
}
else if ( $mode == 'editprofile' || $mode == 'register' )
{
if ( !$userdata['session_logged_in'] && $mode == 'editprofile' )
if ( $userdata['user_id'] == ANONYMOUS && $mode == 'editprofile' )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
header($header_location . "login.$phpEx$SID&redirect=profile.$phpEx&mode=editprofile");
exit;
}
else if ( $userdata['user_id'] != ANONYMOUS && $mode == 'register' )
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . "index.$phpEx$SID");
exit;
}
@@ -110,8 +121,8 @@ if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
else
{
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
header($header_location . append_sid("index.$phpEx", true));
header($header_location . "index.$phpEx$SID");
exit;
}
?>
?>