Commit d284a006 authored by Vincent Petry's avatar Vincent Petry Committed by GitHub

Merge pull request #27482 from owncloud/fix-upgrade

Fix upgrade situation 9.1->10.0
parents d17a83ea 3c5da2bf
......@@ -357,9 +357,8 @@ class OC {
$tooBig = $apps->isInstalled('user_ldap') || $apps->isInstalled('user_shibboleth');
if (!$tooBig) {
// count users
$stats = \OC::$server->getUserManager()->countUsers();
$totalUsers = array_sum($stats);
$tooBig = ($totalUsers > 50);
$db = new \OC\User\Database();
$tooBig = ($db->countUsers() > 50);
}
}
if ($disableWebUpdater || $tooBig) {
......@@ -583,6 +582,11 @@ class OC {
self::initSession();
}
\OC::$server->getEventLogger()->end('init_session');
// incognito mode for now
$uid = \OC::$server->getSession()->get('user_id');
\OC::$server->getSession()->set('user_id', null);
self::checkConfig();
self::checkInstalled();
......@@ -621,6 +625,10 @@ class OC {
\OC::$server->getConfig()->deleteAppValue('core', 'cronErrors');
}
}
// set back user
\OC::$server->getSession()->set('user_id', $uid);
//try to set the session lifetime
$sessionLifeTime = self::getSessionLifeTime();
@ini_set('gc_maxlifetime', (string)$sessionLifeTime);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment