Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-26 21:34:28 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-30 23:48:39 +0400
commit490023ba4e7525abcac001bbf42381baa554f03e (patch)
tree14d4091bd32688b92c3c069064f4145aa0ff1719 /lib/util.php
parent61752fa8d132af13e7121b7ecfdba13bd179d37b (diff)
check every enabled app if the remember login feature needs to be disabled
Diffstat (limited to 'lib/util.php')
-rwxr-xr-xlib/util.php16
1 files 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;
}
/**