diff --git a/common.inc.php b/common.inc.php
index 171e197..ebf3a1d 100644
--- a/common.inc.php
+++ b/common.inc.php
@@ -209,7 +209,8 @@ if(is_array($nav)) {
?>
- /*
+//if they arent logged in, we need _some_ sort of navigation
+if(!is_array($_SESSION['roles'])) {
if ($config['website']) {
if ($config['website_name']) {
echo "- {$config['website_name']}
";
@@ -236,6 +237,9 @@ if(is_array($nav)) {
echo "- ".i18n("Important Dates").'
';
echo $registrationconfirmationlink;
+}
+
+ /*
echo "- ".i18n("Participant Registration").'
';
echo "- ".i18n("Judges Registration").'
';
if($config['volunteer_enable'] == 'yes') {
diff --git a/user.inc.php b/user.inc.php
index f297ccb..b66f132 100644
--- a/user.inc.php
+++ b/user.inc.php
@@ -759,6 +759,9 @@ function try_login($user, $pass)
function user_conference_load($accounts_id,$conferences_id) {
global $config;
+ if(! ($accounts_id && $conferences_id))
+ return $config['SFIABDIRECTORY']."/index.php";
+
/* Use the active conference to find the user id to load */
/* FIXME: Need to be able to handle the case where there is no
* active conference, but one step at a time */
diff --git a/user_login.php b/user_login.php
index 86f12a3..12dc581 100644
--- a/user_login.php
+++ b/user_login.php
@@ -108,14 +108,27 @@ if(isset($_SESSION['accounts_id'])) {
$val=null;
if($val=user_conference_load($accounts_id,$_SESSION['conferences_id'])) {
- header("Location: $status");
- }
- } else if($_GET['action']=="switchconference") {
- //get rid of their current roles, and load their record for the new conference
- $_SESSION['roles']=array();
- if($val=user_conference_load($_SESSION['accounts_id'],$_SESSION['conferences_id'])) {
header("Location: $val");
}
+ else
+ header("Location: ".$config['SFIABDIRECTORY']."/index.php");
+ exit;
+
+ } else if($_GET['action']=="switchconference") {
+ //get rid of their current roles, and load their record for the new conference
+ if(is_array($_SESSION['roles'])) {
+ $_SESSION['roles']=array();
+ if($val=user_conference_load($_SESSION['accounts_id'],$_SESSION['conferences_id'])) {
+ header("Location: $val");
+ exit;
+ }
+ else {
+ header("Location: ".$config['SFIABDIRECTORY']."/index.php");
+ }
+ }
+ else {
+ header("Location: ".$config['SFIABDIRECTORY']."/index.php");
+ }
} else if($_GET['action']=='logout') {
/* Session keys to skip on logout */
$skip = array('debug', 'lang', 'messages');