diff options
| author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-14 14:45:26 +0000 |
|---|---|---|
| committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-07-14 14:45:26 +0000 |
| commit | 4bc4397f4a71972555f55e6e5d6e1aa87efb1428 (patch) | |
| tree | fa6bb402fd18347b664e825421f8e3aa31147d7a /phpBB/profile.php | |
| parent | d03de47b51173dac761e4fdf6e7004661a5565ac (diff) | |
| download | forums-4bc4397f4a71972555f55e6e5d6e1aa87efb1428.tar forums-4bc4397f4a71972555f55e6e5d6e1aa87efb1428.tar.gz forums-4bc4397f4a71972555f55e6e5d6e1aa87efb1428.tar.bz2 forums-4bc4397f4a71972555f55e6e5d6e1aa87efb1428.tar.xz forums-4bc4397f4a71972555f55e6e5d6e1aa87efb1428.zip | |
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
Diffstat (limited to 'phpBB/profile.php')
| -rw-r--r-- | phpBB/profile.php | 23 |
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 |
