aboutsummaryrefslogtreecommitdiff
path: root/app/Models/Auth.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-10-29 00:45:42 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-10-29 00:45:42 +0100
commit9f97f7df8822ed2f32a9bc9d46ece92dee93089c (patch)
treea807ad69acd8e0db815eace379863b562a113c69 /app/Models/Auth.php
parent00127f07c5fc784130d658e3f26519b0279fc6b8 (diff)
Ne pas rafraîchir les flux des utilisateurs non logués depuis x jours
https://github.com/marienfressinaud/FreshRSS/issues/681 Warning: needs some testing
Diffstat (limited to 'app/Models/Auth.php')
-rw-r--r--app/Models/Auth.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/app/Models/Auth.php b/app/Models/Auth.php
index cc23d7974..2971d65c8 100644
--- a/app/Models/Auth.php
+++ b/app/Models/Auth.php
@@ -20,10 +20,11 @@ class FreshRSS_Auth {
Minz_Session::_param('currentUser', $current_user);
}
- $access_ok = self::accessControl();
-
- if ($access_ok) {
+ if (self::$login_ok) {
self::giveAccess();
+ } elseif (self::accessControl()) {
+ self::giveAccess();
+ FreshRSS_UserDAO::touch($current_user);
} else {
// Be sure all accesses are removed!
self::removeAccess();
@@ -38,11 +39,7 @@ class FreshRSS_Auth {
*
* @return boolean true if user can be connected, false else.
*/
- public static function accessControl() {
- if (self::$login_ok) {
- return true;
- }
-
+ private static function accessControl() {
switch (Minz_Configuration::authType()) {
case 'form':
$credentials = FreshRSS_FormAuth::getCredentialsFromCookie();