aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-09-26 19:34:28 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2013-09-26 19:34:28 +0200
commit9bb244cc59504b3686b58183315d046084b05fa6 (patch)
tree6ff488df7aaa31e0dec7f7cc1eeba21279b91379
parentc486fc76089ebc0f421a983e0ef62286e36e533c (diff)
downloadnextcloud-server-9bb244cc59504b3686b58183315d046084b05fa6.tar.gz
nextcloud-server-9bb244cc59504b3686b58183315d046084b05fa6.zip
check every enabled app if the remember login feature needs to be disabled
-rwxr-xr-xlib/util.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/util.php b/lib/util.php
index e12f753d5ae..e1bec4aece3 100755
--- a/lib/util.php
+++ b/lib/util.php
@@ -511,13 +511,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;
}
/**