Merge pull request #23799 from owncloud/dont-collide-with-php-internals

[stable9] Use static method
This commit is contained in:
C. Montero Luque 2016-04-06 09:20:19 -04:00
commit 1092de539f
1 changed files with 2 additions and 3 deletions

View File

@ -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',