aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/profile.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/profile.php')
-rw-r--r--phpBB/profile.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/phpBB/profile.php b/phpBB/profile.php
index d544bbd570..f4c456a296 100644
--- a/phpBB/profile.php
+++ b/phpBB/profile.php
@@ -28,13 +28,18 @@ 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
//
$script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path']));
@@ -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 . "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 . append_sid("login.$phpEx?redirect=profile.$phpEx&mode=editprofile", true));
+ 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;
}
-?>
+?> \ No newline at end of file