From 5bb06723b0bbe3059d6bcb3a604371ab1530b492 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 25 May 2016 17:35:52 +0200 Subject: [PATCH] Hack to prevent infinite loop with LDAP + logging Forward port of a50619200c6a08929dbe802118a6afadb376b866 to 9.1/master --- lib/private/Log/Owncloud.php | 5 ++--- 1 file 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', -- 2.39.5