diff options
author | Christoph Wurst <christoph@owncloud.com> | 2016-04-27 12:01:13 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-05-11 13:36:46 +0200 |
commit | 7aa16e1559e8ef1121ac2529090a6881b4d919d5 (patch) | |
tree | 3967b0038d51acc71c7e41b44fd1008c004f7fa5 /lib/private/Setup.php | |
parent | 18704a9fc879b13322d6ddc6f8e0ef331415a5c3 (diff) | |
download | nextcloud-server-7aa16e1559e8ef1121ac2529090a6881b4d919d5.tar.gz nextcloud-server-7aa16e1559e8ef1121ac2529090a6881b4d919d5.zip |
fix setup
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r-- | lib/private/Setup.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 94197f7f27f..67d714188ac 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -364,7 +364,14 @@ class Setup { $group =\OC::$server->getGroupManager()->createGroup('admin'); $group->addUser($user); - \OC_User::login($username, $password); + + // Create a session token for the newly created user + // The token provider requires a working db, so it's not injected on setup + /* @var $userSession User\Session */ + $userSession = \OC::$server->getUserSession(); + $defaultTokenProvider = \OC::$server->query('OC\Authentication\Token\DefaultTokenProvider'); + $userSession->setTokenProvider($defaultTokenProvider); + $userSession->createSessionToken($request, $username, $password); //guess what this does Installer::installShippedApps(); |