From 490023ba4e7525abcac001bbf42381baa554f03e Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Thu, 26 Sep 2013 19:34:28 +0200 Subject: [PATCH] check every enabled app if the remember login feature needs to be disabled --- lib/util.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/lib/util.php b/lib/util.php index 4ae85c4be91..ef0b6143e67 100755 --- a/lib/util.php +++ b/lib/util.php @@ -412,13 +412,23 @@ class OC_Util { /** * Check if it is allowed to remember login. - * E.g. if encryption is enabled the user needs to log-in every time he visites - * ownCloud in order to decrypt the private key. + * + * @note Every app can set 'rememberlogin' to 'false' to disable the remember login feature * * @return bool */ public static function rememberLoginAllowed() { - return !OC_App::isEnabled('files_encryption'); + + $apps = OC_App::getEnabledApps(); + + foreach ($apps as $app) { + $appInfo = OC_App::getAppInfo($app); + if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') { + return false; + } + + } + return true; } /** -- 2.39.5