summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-05-20 13:52:08 +0200
committerVincent Petry <pvince81@owncloud.com>2015-05-20 13:52:08 +0200
commit7386257676cff4648f4e71d05cdabff75578e947 (patch)
treea7320e5eec4f943cbc03f97cf5b9d942a5ef672e /lib
parentf9784745776eda5caedbbc72cf516ae70bce6f6a (diff)
parent6d97dfb00c6bd660d9f8ac3a579f34d70fe87af1 (diff)
downloadnextcloud-server-7386257676cff4648f4e71d05cdabff75578e947.tar.gz
nextcloud-server-7386257676cff4648f4e71d05cdabff75578e947.zip
Merge pull request #16075 from owncloud/skeleton-copy-delay
wait with copying the skeleton untill login and setupfs are done
Diffstat (limited to 'lib')
-rw-r--r--lib/private/log/errorhandler.php12
-rw-r--r--lib/private/user.php5
-rw-r--r--lib/private/util.php3
3 files changed, 13 insertions, 7 deletions
diff --git a/lib/private/log/errorhandler.php b/lib/private/log/errorhandler.php
index b1b15f12ed7..5e92db398f9 100644
--- a/lib/private/log/errorhandler.php
+++ b/lib/private/log/errorhandler.php
@@ -64,10 +64,16 @@ class ErrorHandler {
}
}
- // Uncaught exception handler
+ /**
+ * Uncaught exception handler
+ *
+ * @param \Exception $exception
+ */
public static function onException($exception) {
- $msg = $exception->getMessage() . ' at ' . $exception->getFile() . '#' . $exception->getLine();
- self::$logger->critical(self::removePassword($msg), array('app' => 'PHP'));
+ $class = get_class($exception);
+ $msg = $exception->getMessage();
+ $msg = "$class: $msg at " . $exception->getFile() . '#' . $exception->getLine();
+ self::$logger->critical(self::removePassword($msg), ['app' => 'PHP']);
}
//Recoverable errors handler
diff --git a/lib/private/user.php b/lib/private/user.php
index b3677233825..2192cbba322 100644
--- a/lib/private/user.php
+++ b/lib/private/user.php
@@ -241,7 +241,10 @@ class OC_User {
$result = self::getUserSession()->login($loginname, $password);
if ($result) {
//we need to pass the user name, which may differ from login name
- OC_Util::setupFS(self::getUserSession()->getUser()->getUID());
+ $user = self::getUserSession()->getUser()->getUID();
+ OC_Util::setupFS($user);
+ //trigger creation of user home and /files folder
+ \OC::$server->getUserFolder($user);
}
return $result;
}
diff --git a/lib/private/util.php b/lib/private/util.php
index 4288f8e293a..4470006b90c 100644
--- a/lib/private/util.php
+++ b/lib/private/util.php
@@ -189,9 +189,6 @@ class OC_Util {
//jail the user into his "home" directory
\OC\Files\Filesystem::init($user, $userDir);
- //trigger creation of user home and /files folder
- \OC::$server->getUserFolder($user);
-
OC_Hook::emit('OC_Filesystem', 'setup', array('user' => $user, 'user_dir' => $userDir));
}
\OC::$server->getEventLogger()->end('setup_fs');