Code Duplication    Length = 5-6 lines in 2 locations

lib/private/legacy/util.php 1 location

@@ 430-435 (lines=6) @@
427
			
428
			// Allow overriding update channel
429
			
430
			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
431
				$channel = \OC::$server->getAppConfig()->getValue('core', 'OC_Channel');
432
			} else {
433
				/** @var $OC_Channel string */
434
				$channel = $OC_Channel;
435
			}
436
			
437
			if (!is_null($channel)) {
438
				$session->set('OC_Channel', $channel);

lib/private/Server.php 1 location

@@ 235-239 (lines=5) @@
232
			$timeFactory = new TimeFactory();
233
			// Token providers might require a working database. This code
234
			// might however be called when ownCloud is not yet setup.
235
			if (\OC::$server->getSystemConfig()->getValue('installed', false)) {
236
				$defaultTokenProvider = $c->query('OC\Authentication\Token\IProvider');
237
			} else {
238
				$defaultTokenProvider = null;
239
			}
240
241
			$userSession = new \OC\User\Session($manager, $session, $timeFactory, $defaultTokenProvider, $c->getConfig());
242
			$userSession->listen('\OC\User', 'preCreateUser', function ($uid, $password) {