* security levels + login requirement:
*/
-if (!isset($GLOBALS['phorkie']['auth']['secure'])) {
+if (!isset($GLOBALS['phorkie']['auth']['securityLevel'])) {
//not set? highest level of security
- $GLOBALS['phorkie']['auth']['secure'] = 2;
+ $GLOBALS['phorkie']['auth']['securityLevel'] = 2;
}
-if ($GLOBALS['phorkie']['auth']['secure'] == 0) {
+if ($GLOBALS['phorkie']['auth']['securityLevel'] == 0) {
//everyone may do everything
return;
}
$logged_in = false;
if (!isset($_SESSION['identity'])) {
//not logged in
-} else if ($GLOBALS['phorkie']['auth']['userlist']) {
- if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['users'])) {
+} else if ($GLOBALS['phorkie']['auth']['listedUsersOnly']) {
+ if (in_array($_SESSION['identity'], $GLOBALS['phorkie']['auth']['users'])) {
$logged_in = true;
}
} else {
$logged_in = true;
}
-if ($pageRequiresLogin >= $GLOBALS['phorkie']['auth']['secure']) {
+if ($secureAtLevel >= $GLOBALS['phorkie']['auth']['securityLevel']) {
if ($logged_in) {
return;
}