diff options
author | Björn Schießle <schiessle@owncloud.com> | 2016-05-03 14:16:17 +0200 |
---|---|---|
committer | Björn Schießle <schiessle@owncloud.com> | 2016-05-03 14:22:26 +0200 |
commit | d9163c29f3a6cff344a3a43d07fb168b832d51f0 (patch) | |
tree | c57f93187011701bddb6a9eca4143291816c3b3c | |
parent | a3a53075d8c3976e1c7ff4017a4c70da6810e300 (diff) | |
download | nextcloud-server-d9163c29f3a6cff344a3a43d07fb168b832d51f0.tar.gz nextcloud-server-d9163c29f3a6cff344a3a43d07fb168b832d51f0.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
-rw-r--r-- | lib/private/user.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/user.php b/lib/private/user.php index f34dfcc4179..7c839e6a4c8 100644 --- a/lib/private/user.php +++ b/lib/private/user.php @@ -289,10 +289,14 @@ 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; } |