diff options
Diffstat (limited to 'lib/private/legacy/util.php')
-rw-r--r-- | lib/private/legacy/util.php | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php index 4c9419d6eda..3c56008a48b 100644 --- a/lib/private/legacy/util.php +++ b/lib/private/legacy/util.php @@ -958,11 +958,12 @@ class OC_Util { public static function checkLoggedIn() { // Check if we are a user if (!OC_User::isLoggedIn()) { - header('Location: ' . \OCP\Util::linkToAbsolute('', 'index.php', - [ - 'redirect_url' => \OC::$server->getRequest()->getRequestUri() - ] - ) + header('Location: ' . \OC::$server->getURLGenerator()->linkToRoute( + 'core.login.showLoginForm', + [ + 'redirect_url' => urlencode(\OC::$server->getRequest()->getRequestUri()), + ] + ) ); exit(); } |