diff --git a/lib/private/log/owncloud.php b/lib/private/log/owncloud.php index 9c106299e4..781b3b79b5 100644 --- a/lib/private/log/owncloud.php +++ b/lib/private/log/owncloud.php @@ -91,11 +91,10 @@ class OC_Log_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',