forked from science-ation/science-ation
- 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:
parent
fa9b298959
commit
9a98fb8da8
@ -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 */
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user