From 82b957eee455eaf36adc375936f53f84406b9b8f Mon Sep 17 00:00:00 2001 From: dave Date: Mon, 19 Nov 2007 17:11:47 +0000 Subject: [PATCH] - Fix a bug in multirole --- common.inc.php | 2 +- user_login.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common.inc.php b/common.inc.php index 60b15c6..7b57a54 100644 --- a/common.inc.php +++ b/common.inc.php @@ -432,7 +432,7 @@ if(isset($_SESSION['users_type'])) { echo i18n($types[$_SESSION['users_type']]); } echo " {$_SESSION['email']}: "; - if($_SESSION['multirole']) { + if($_SESSION['multirole'] == true) { echo "[".i18n('Switch Roles')."] "; } echo "[".i18n("Logout")."]"; diff --git a/user_login.php b/user_login.php index beb36ce..42c9e1e 100644 --- a/user_login.php +++ b/user_login.php @@ -144,7 +144,7 @@ /* Setup multirole so a multirole user can switch if they want to * without logging in/out */ - if($u['types'] > 1) { + if(count($u['types']) > 1) { $_SESSION['multirole'] = true; } else { $_SESSION['multirole'] = false;