forked from science-ation/science-ation
- Fixup the location: redirections in user_auth_required()
This commit is contained in:
parent
4aa73784bb
commit
1a246cba5d
@ -361,18 +361,19 @@ function user_valid_password($pass)
|
||||
*/
|
||||
function user_auth_required($type, $access='')
|
||||
{
|
||||
global $config;
|
||||
if(!isset($_SESSION['users_type'])) {
|
||||
header("location: user_login.php?type=$type¬ice=auth_required");
|
||||
header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type¬ice=auth_required");
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_SESSION['users_type'] != $type) {
|
||||
header("location: user_login.php?type=$type¬ice=auth_required");
|
||||
header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type¬ice=auth_required");
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_SESSION['password_expired'] == true) {
|
||||
header("location: user_password.php");
|
||||
header("location: {$config['SFIABDIRECTORY']}/user_password.php");
|
||||
exit;
|
||||
}
|
||||
|
||||
@ -383,7 +384,7 @@ function user_auth_required($type, $access='')
|
||||
}
|
||||
|
||||
if(committee_auth_has_access($access) == false) {
|
||||
header("Location: ".$config['SFIABDIRECTORY']."/committee_main.php?notice=no_auth");
|
||||
header("Location: {$config['SFIABDIRECTORY']}/committee_main.php?notice=no_auth");
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user