diff --git a/apps/files_encryption/appinfo/info.xml b/apps/files_encryption/appinfo/info.xml
index 46f1375c98..9d495916d2 100644
--- a/apps/files_encryption/appinfo/info.xml
+++ b/apps/files_encryption/appinfo/info.xml
@@ -7,6 +7,7 @@
Sam Tuke, Bjoern Schiessle, Florin Peter
4
true
+ false
diff --git a/core/templates/login.php b/core/templates/login.php
index ee761f0aa5..06f64d41e3 100644
--- a/core/templates/login.php
+++ b/core/templates/login.php
@@ -32,9 +32,10 @@
t('Lost your password?')); ?>
-
+
+
diff --git a/lib/base.php b/lib/base.php
index 58894be03e..036051119d 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -770,6 +770,7 @@ class OC {
|| !isset($_COOKIE["oc_token"])
|| !isset($_COOKIE["oc_username"])
|| !$_COOKIE["oc_remember_login"]
+ || !OC_Util::rememberLoginAllowed()
) {
return false;
}
diff --git a/lib/util.php b/lib/util.php
index 6be56d07c9..1fb867d3ac 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -471,6 +471,7 @@ class OC_Util {
}
$parameters['alt_login'] = OC_App::getAlternativeLogIns();
+ $parameters['rememberLoginAllowed'] = self::rememberLoginAllowed();
OC_Template::printGuestPage("", "login", $parameters);
}
@@ -512,6 +513,27 @@ class OC_Util {
}
}
+ /**
+ * Check if it is allowed to remember login.
+ *
+ * @note Every app can set 'rememberlogin' to 'false' to disable the remember login feature
+ *
+ * @return bool
+ */
+ public static function rememberLoginAllowed() {
+
+ $apps = OC_App::getEnabledApps();
+
+ foreach ($apps as $app) {
+ $appInfo = OC_App::getAppInfo($app);
+ if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
+ return false;
+ }
+
+ }
+ return true;
+ }
+
/**
* @brief Check if the user is a subadmin, redirects to home if not
* @return array $groups where the current user is subadmin