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

@@ 361-371 (lines=11) @@
358
	 *
359
	 * @internal
360
	 */
361
	public function getAppInfo($appId) {
362
		$appInfo = \OC_App::getAppInfo($appId);
363
		if ($appInfo === null) {
364
			return null;
365
		}
366
		if (!isset($appInfo['version'])) {
367
			// read version from separate file
368
			$appInfo['version'] = \OC_App::getAppVersion($appId);
369
		}
370
		return $appInfo;
371
	}
372
373
	/**
374
	 * Returns a list of apps incompatible with the given version