diff -r aa8ffe41d1c4 -r 95c4d91bd954 plugins/SpecialUserFuncs.php --- a/plugins/SpecialUserFuncs.php Tue Aug 14 20:48:29 2007 -0400 +++ b/plugins/SpecialUserFuncs.php Thu Aug 16 20:35:49 2007 -0400 @@ -124,6 +124,8 @@ { $level = USER_LEVEL_MEMBER; } + if ( $level <= USER_LEVEL_MEMBER && $session->user_logged_in ) + $paths->main_page(); $template->header(); echo '
'; $header = ( $level > USER_LEVEL_MEMBER ) ? 'Please re-enter your login details' : 'Please enter your username and password to log in.'; @@ -274,11 +276,11 @@ if(isset($_POST['return_to'])) { $name = ( isset($paths->pages[$_POST['return_to']]['name']) ) ? $paths->pages[$_POST['return_to']]['name'] : $_POST['return_to']; - redirect( makeUrl($_POST['return_to']), 'Login successful', 'You have successfully logged into the '.getConfig('site_name').' site as "'.$session->username.'". Redirecting to ' . $name . '...' ); + redirect( makeUrl($_POST['return_to'], false, true), 'Login successful', 'You have successfully logged into the '.getConfig('site_name').' site as "'.$session->username.'". Redirecting to ' . $name . '...' ); } else { - $paths->main_page(); + redirect( makeUrl(getConfig('main_page'), false, true), 'Login successful', 'You have successfully logged into the '.getConfig('site_name').' site as "'.$session->username.'". Redirecting to the main page...' ); } } else @@ -308,8 +310,14 @@ function page_Special_Logout() { global $db, $session, $paths, $template, $plugins; // Common objects + if ( !$session->user_logged_in ) + $paths->main_page(); + $l = $session->logout(); - if($l == 'success') $paths->main_page(); + if ( $l == 'success' ) + { + redirect(makeUrl(getConfig('main_page'), false, true), 'Logged out', 'You have been successfully logged out, and all cookies have been cleared. You will now be transferred to the main page.', 4); + } $template->header(); echo '

An error occurred during the logout process.

'.$l.'

'; $template->footer(); @@ -323,6 +331,10 @@ $s = ($session->user_level >= USER_LEVEL_ADMIN) ? '

Oops...it seems that you are the administrator...hehe...you can also force account registration to work.

' : ''; die_friendly('Registration disabled', '

The administrator has disabled new user registration on this site.

' . $s); } + if ( $session->user_level < USER_LEVEL_ADMIN && $session->user_logged_in ) + { + $paths->main_page(); + } if(isset($_POST['submit'])) { $_GET['coppa'] = ( isset($_POST['coppa']) ) ? $_POST['coppa'] : 'x';