aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/user.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-08-18 15:32:40 +0200
committerLukas Reschke <lukas@statuscode.ch>2017-08-18 15:32:40 +0200
commit2e4cd445564ba4882ab239bbfd82b6aa800436e3 (patch)
tree9f8126ff5dde02c01f27b04ce921db26aad3ba2f /lib/private/legacy/user.php
parenta04feff9a780d77ca172ba7558a7d0cc4e01dc36 (diff)
downloadnextcloud-server-2e4cd445564ba4882ab239bbfd82b6aa800436e3.tar.gz
nextcloud-server-2e4cd445564ba4882ab239bbfd82b6aa800436e3.zip
Inject \OCP\IURLGenerator to make tests work
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib/private/legacy/user.php')
-rw-r--r--lib/private/legacy/user.php5
1 files changed, 3 insertions, 2 deletions
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(),