summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/user.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-26 18:50:52 +0200
committerGitHub <noreply@github.com>2017-08-26 18:50:52 +0200
commit0b652648cc698d3b5c2979ccb7f1d1544057294d (patch)
tree43e49602aee82520f57690bb952510b99466782d /lib/private/legacy/user.php
parent2966b503ba9eac0ff1becdeb014cf8ecc0b3660a (diff)
parent2e4cd445564ba4882ab239bbfd82b6aa800436e3 (diff)
downloadnextcloud-server-0b652648cc698d3b5c2979ccb7f1d1544057294d.tar.gz
nextcloud-server-0b652648cc698d3b5c2979ccb7f1d1544057294d.zip
Merge pull request #6177 from nextcloud/properly-add-slo-url
Properly allow \OCP\Authentication\IApacheBackend to specify logout URL
Diffstat (limited to 'lib/private/legacy/user.php')
-rw-r--r--lib/private/legacy/user.php15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/private/legacy/user.php b/lib/private/legacy/user.php
index 210e428a2e0..9e0ca4b9fee 100644
--- a/lib/private/legacy/user.php
+++ b/lib/private/legacy/user.php
@@ -281,26 +281,25 @@ class OC_User {
}
/**
- * Supplies an attribute to the logout hyperlink. The default behaviour
- * is to return an href with '?logout=true' appended. However, it can
- * supply any attribute(s) which are valid for <a>.
+ * Returns the current logout URL valid for the currently logged-in user
*
- * @return string with one or more HTML attributes.
+ * @param \OCP\IURLGenerator $urlGenerator
+ * @return string
*/
- public static function getLogoutAttribute() {
+ public static function getLogoutUrl(\OCP\IURLGenerator $urlGenerator) {
$backend = self::findFirstActiveUsedBackend();
if ($backend) {
- return $backend->getLogoutAttribute();
+ return $backend->getLogoutUrl();
}
- $logoutUrl = \OC::$server->getURLGenerator()->linkToRouteAbsolute(
+ $logoutUrl = $urlGenerator->linkToRouteAbsolute(
'core.login.logout',
[
'requesttoken' => \OCP\Util::callRegister(),
]
);
- return 'href="'.$logoutUrl.'"';
+ return $logoutUrl;
}
/**