summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2016-05-03 10:41:37 +0200
committerBjörn Schießle <schiessle@owncloud.com>2016-05-03 10:46:05 +0200
commit8c0984d605361be7cf200257900a89685ee8f3da (patch)
tree3225a6e5b2a9f17efb8a492d82347f37db5249bb /lib/private
parent547830d97edd2c4da46a2d7988873fdc65e00bb4 (diff)
downloadnextcloud-server-8c0984d605361be7cf200257900a89685ee8f3da.tar.gz
nextcloud-server-8c0984d605361be7cf200257900a89685ee8f3da.zip
first call the post_login hooks, before we call getUserFolder.
The login process needs to be completed before we can safely create the users home folder. For example we need to give encryption a chance to initialize the users encryption keys in order to copy the skeleton files correctly
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/legacy/user.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index 11c35daa0de..b415c34d849 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -205,10 +205,13 @@ class OC_User {
self::getUserSession()->setLoginName($uid);
// setup the filesystem
OC_Util::setupFS($uid);
+ // first call the post_login hooks, the login-process needs to be
+ // completed before we can safely create the users folder.
+ // For example encryption needs to initialize the users keys first
+ // before we can create the user folder with the skeleton files
+ OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
//trigger creation of user home and /files folder
\OC::$server->getUserFolder($uid);
-
- OC_Hook::emit("OC_User", "post_login", array("uid" => $uid, 'password' => ''));
}
return true;
}