From 3e944d7d3b35a5dcead05f978f07cc343b448dd7 Mon Sep 17 00:00:00 2001 From: Cake Date: Tue, 23 Mar 2010 23:53:59 +0900 Subject: [PATCH] =?utf8?q?=E3=83=AD=E3=82=B0=E3=82=A4=E3=83=B3/=E3=83=AD?= =?utf8?q?=E3=82=B0=E3=82=A2=E3=82=A6=E3=83=88=E3=83=AA=E3=83=80=E3=82=A4?= =?utf8?q?=E3=83=AC=E3=82=AF=E3=83=88=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/controllers/components/auth_plus.php | 6 +++++- app/controllers/users_controller.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/components/auth_plus.php b/app/controllers/components/auth_plus.php index ca18152..31e2ca2 100644 --- a/app/controllers/components/auth_plus.php +++ b/app/controllers/components/auth_plus.php @@ -35,7 +35,11 @@ class AuthPlusComponent extends AuthComponent { parent::initialize($controller); // ログイン後リダイレクト設定 - $this->loginRedirect = $controller->params["url"]["url"]; + if (isset($controller->params["url"]["url"])) { + $this->loginRedirect = $controller->params["url"]["url"]; + } else { + $this->loginRedirect = Configure::read('Routing.basePath'); + } if ("/".$this->loginRedirect == Router::normalize(Configure::read('Routing.loginPath'))) { $this->loginRedirect = Router::normalize(Configure::read('Routing.basePath')); if (Configure::read('mobileUserAgent')) { diff --git a/app/controllers/users_controller.php b/app/controllers/users_controller.php index 943a3e2..4b59606 100644 --- a/app/controllers/users_controller.php +++ b/app/controllers/users_controller.php @@ -48,7 +48,7 @@ class UsersController extends ModuleController { // 現在のセッション削除 $this->AuthPlus->logout(); - $this->set('refresh', array('time' => $refresh, 'url' => Router::url(array('controller' => 'characters', 'action' => 'index'), false))); + $this->set('refresh', array('time' => $refresh, 'url' => Router::url(Configure::read('Routing.basePath'), false))); } function index() { -- 2.11.0