- Don't let the user see the login page if they're already login, instead,

provide them with a message indicating how to logout.
This commit is contained in:
dave 2007-11-16 08:00:40 +00:00
parent fa9b298959
commit 9a98fb8da8
2 changed files with 9 additions and 0 deletions

View File

@ -60,7 +60,13 @@
* logged in. */
$type = false;
if(isset($_SESSION['users_type'])) {
/* They're already logged in */
$type = $_SESSION['users_type'];
/* If they're not trying to logout, don't let them see the login page */
if($_GET['action'] != 'logout') {
header("location: {$type}_main.php?notice=already_logged_in");
exit;
}
} else {
$type = $_GET['type'];
/* user_types is in user.inc.php */

View File

@ -36,6 +36,9 @@
case 'password_changed':
echo happy(i18n('Your password has been successfully updated'));
break;
case 'already_logged_in':
echo error(i18n('You are already logged in, please use the [Logout] link in the upper right to logout'));
break;
}
//only display the named greeting if we have their name