diff options
| author | 2014-01-18 01:00:17 +0100 | |
|---|---|---|
| committer | 2014-01-18 01:00:17 +0100 | |
| commit | 41033768c3eacbd564c3ec15455587e4f725a055 (patch) | |
| tree | 461e38fa717d4ceec58e9caeab98e6f5ab5198ee /lib/Minz/Configuration.php | |
| parent | fb908d45577cd0f156104eb23b4b9859d40b6da2 (diff) | |
Mode anonyme pour connexion avec formulaire
Contribue à https://github.com/marienfressinaud/FreshRSS/issues/361
Diffstat (limited to 'lib/Minz/Configuration.php')
| -rw-r--r-- | lib/Minz/Configuration.php | 9 |
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'])) { |
