1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00
nextcloud_ynh/patches/00-add-logout_url-conf.patch

15 lines
751 B
Diff

--- a/lib/base.php 2016-04-04 21:26:47.281448433 +0200
+++ b/lib/base.php 2016-04-04 21:27:16.034283534 +0200
@@ -920,8 +920,10 @@
\OC::$server->getConfig()->deleteUserValue(OC_User::getUser(), 'login_token', $_COOKIE['oc_token']);
}
OC_User::logout();
- // redirect to webroot and add slash if webroot is empty
- header("Location: " . \OC::$server->getURLGenerator()->getAbsoluteURL('/'));
+ // Use system config or redirect to webroot and add slash if webroot is empty
+ $redirect_url = $systemConfig->getValue('logout_url',
+ \OC::$server->getURLGenerator()->getAbsoluteURL('/'));
+ header("Location: " . $redirect_url);
} else {
// Redirect to default application
OC_Util::redirectToDefaultPage();