From 640538e18581fb260997b0e84f131eda2b67c98f Mon Sep 17 00:00:00 2001 From: emkael Date: Sat, 7 May 2016 13:24:35 +0200 Subject: * better handling of login redirects --- app/php/controls/HeaderMenu.php | 5 +++-- app/php/controls/HeaderMenu.tpl | 2 ++ app/php/controls/LoginBox.php | 22 ++++++++++++++++++---- 3 files changed, 23 insertions(+), 6 deletions(-) (limited to 'app/php') diff --git a/app/php/controls/HeaderMenu.php b/app/php/controls/HeaderMenu.php index 1e74be3..2488629 100644 --- a/app/php/controls/HeaderMenu.php +++ b/app/php/controls/HeaderMenu.php @@ -7,9 +7,10 @@ Prado::using('System.Web.UI.ActiveControls.TActiveLinkButton'); class HeaderMenu extends TemplateControl { public function loginUser($sender, $param) { - $this->Application->getModule('auth')->setReturnUrl($this->Request->RequestUri); + $authModule = $this->Application->getModule('auth'); + $authModule->setReturnUrl($this->Request->RequestUri); $this->Response->redirect( - $this->Service->ConstructUrl('Login') + $this->Service->ConstructUrl($authModule->LoginPage) ); } diff --git a/app/php/controls/HeaderMenu.tpl b/app/php/controls/HeaderMenu.tpl index b50c4ef..c475a23 100644 --- a/app/php/controls/HeaderMenu.tpl +++ b/app/php/controls/HeaderMenu.tpl @@ -1,6 +1,8 @@