Merge pull request #24851 from owncloud/ldap-static-method-log

Hack to prevent infinite loop with LDAP + logging
This commit is contained in:
Vincent Petry 2016-05-31 13:52:52 +02:00
commit 2b111b217c
1 changed files with 2 additions and 3 deletions

View File

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