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
This commit is contained in:
Björn Schießle 2016-05-03 10:41:37 +02:00
parent 547830d97e
commit 8c0984d605
No known key found for this signature in database
GPG key ID: 2378A753E2BF04F6

View file

@ -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;
}