summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Minz/Configuration.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Minz/Configuration.php b/lib/Minz/Configuration.php
index 433992e0d..72e2cedc0 100644
--- a/lib/Minz/Configuration.php
+++ b/lib/Minz/Configuration.php
@@ -113,7 +113,7 @@ class Minz_Configuration {
}
public static function _allowAnonymous($allow = false) {
- self::$allow_anonymous = (bool)$allow;
+ self::$allow_anonymous = ((bool)$allow) && self::canLogIn();
}
public static function _authType($value) {
$value = strtolower($value);
@@ -125,6 +125,7 @@ class Minz_Configuration {
self::$auth_type = $value;
break;
}
+ self::_allowAnonymous(self::$allow_anonymous);
}
/**
@@ -252,12 +253,12 @@ class Minz_Configuration {
if (isset ($general['default_user'])) {
self::$default_user = $general['default_user'];
}
- if (isset ($general['allow_anonymous'])) {
- self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no');
- }
if (isset ($general['auth_type'])) {
self::_authType($general['auth_type']);
}
+ if (isset ($general['allow_anonymous'])) {
+ self::$allow_anonymous = ((bool)($general['allow_anonymous'])) && ($general['allow_anonymous'] !== 'no');
+ }
// Base de données
if (isset ($ini_array['db'])) {