From 2e4cd445564ba4882ab239bbfd82b6aa800436e3 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 18 Aug 2017 15:32:40 +0200 Subject: Inject \OCP\IURLGenerator to make tests work Signed-off-by: Lukas Reschke --- lib/private/legacy/user.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/legacy/user.php') diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php index 97f302c826e..9e0ca4b9fee 100644 --- a/lib/private/legacy/user.php +++ b/lib/private/legacy/user.php @@ -283,15 +283,16 @@ class OC_User { /** * Returns the current logout URL valid for the currently logged-in user * + * @param \OCP\IURLGenerator $urlGenerator * @return string */ - public static function getLogoutUrl() { + public static function getLogoutUrl(\OCP\IURLGenerator $urlGenerator) { $backend = self::findFirstActiveUsedBackend(); if ($backend) { return $backend->getLogoutUrl(); } - $logoutUrl = \OC::$server->getURLGenerator()->linkToRouteAbsolute( + $logoutUrl = $urlGenerator->linkToRouteAbsolute( 'core.login.logout', [ 'requesttoken' => \OCP\Util::callRegister(), -- cgit v1.2.3