- Fixup the location: redirections in user_auth_required()

This commit is contained in:
dave 2007-11-19 07:01:51 +00:00
parent 4aa73784bb
commit 1a246cba5d

View File

@ -361,18 +361,19 @@ function user_valid_password($pass)
*/ */
function user_auth_required($type, $access='') function user_auth_required($type, $access='')
{ {
global $config;
if(!isset($_SESSION['users_type'])) { if(!isset($_SESSION['users_type'])) {
header("location: user_login.php?type=$type&notice=auth_required"); header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type&notice=auth_required");
exit; exit;
} }
if($_SESSION['users_type'] != $type) { if($_SESSION['users_type'] != $type) {
header("location: user_login.php?type=$type&notice=auth_required"); header("location: {$config['SFIABDIRECTORY']}/user_login.php?type=$type&notice=auth_required");
exit; exit;
} }
if($_SESSION['password_expired'] == true) { if($_SESSION['password_expired'] == true) {
header("location: user_password.php"); header("location: {$config['SFIABDIRECTORY']}/user_password.php");
exit; exit;
} }
@ -383,7 +384,7 @@ function user_auth_required($type, $access='')
} }
if(committee_auth_has_access($access) == false) { 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; exit;
} }
} }