Skip to content
Snippets Groups Projects
Commit 6c9ad6a5 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

re #5

parent cfde5646
No related branches found
No related tags found
No related merge requests found
...@@ -98,6 +98,7 @@ final class CookieAuth extends StudIPPlugin implements SystemPlugin ...@@ -98,6 +98,7 @@ final class CookieAuth extends StudIPPlugin implements SystemPlugin
public function login_action(): void public function login_action(): void
{ {
$redirect = Request::get('return_to', 'index.php'); $redirect = Request::get('return_to', 'index.php');
$location = URLHelper::getURL($redirect);
if ( if (
$this->cookie_login_user $this->cookie_login_user
...@@ -109,7 +110,8 @@ final class CookieAuth extends StudIPPlugin implements SystemPlugin ...@@ -109,7 +110,8 @@ final class CookieAuth extends StudIPPlugin implements SystemPlugin
auth()->setAuthenticatedUser($this->cookie_login_user); auth()->setAuthenticatedUser($this->cookie_login_user);
} }
header('Location: ' . URLHelper::getURL($redirect)); header('Location: ' . $location, true, 302);
die;
} }
public static function onEnable($plugin_id) public static function onEnable($plugin_id)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment