summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Log/Owncloud.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/private/Log/Owncloud.php b/lib/private/Log/Owncloud.php
index 0a0902b7fa1..07106be22b1 100644
--- a/lib/private/Log/Owncloud.php
+++ b/lib/private/Log/Owncloud.php
@@ -94,11 +94,10 @@ class Owncloud {
$url = ($request->getRequestUri() !== '') ? $request->getRequestUri() : '--';
$method = is_string($request->getMethod()) ? $request->getMethod() : '--';
if(\OC::$server->getConfig()->getSystemValue('installed', false)) {
- $userObj = \OC::$server->getUserSession()->getUser();
+ $user = (\OC_User::getUser()) ? \OC_User::getUser() : '--';
} else {
- $userObj = null;
+ $user = '--';
}
- $user = !is_null($userObj) ? $userObj->getUID() : '--';
$entry = compact(
'reqId',
'remoteAddr',