Code Duplication    Length = 11-13 lines in 2 locations

lib/private/legacy/util.php 1 location

@@ 1045-1057 (lines=13) @@
1042
	 *
1043
	 * @return bool
1044
	 */
1045
	public static function rememberLoginAllowed() {
1046
1047
		$apps = OC_App::getEnabledApps();
1048
1049
		foreach ($apps as $app) {
1050
			$appInfo = OC_App::getAppInfo($app);
1051
			if (isset($appInfo['rememberlogin']) && $appInfo['rememberlogin'] === 'false') {
1052
				return false;
1053
			}
1054
1055
		}
1056
		return true;
1057
	}
1058
1059
	/**
1060
	 * Check if the user has administration privileges, redirects to home if not

lib/private/App/AppManager.php 1 location

@@ 352-362 (lines=11) @@
349
	 *
350
	 * @internal
351
	 */
352
	public function getAppInfo($appId) {
353
		$appInfo = \OC_App::getAppInfo($appId);
354
		if ($appInfo === null) {
355
			return null;
356
		}
357
		if (!isset($appInfo['version'])) {
358
			// read version from separate file
359
			$appInfo['version'] = \OC_App::getAppVersion($appId);
360
		}
361
		return $appInfo;
362
	}
363
364
	/**
365
	 * Returns a list of apps incompatible with the given version