diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2013-01-02 12:18:49 +0400 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2013-01-02 12:18:49 +0400 |
commit | f55e2c4d65b560a2f93fb46ca1b782ccd0540a94 (patch) | |
tree | 85b8eb9837f7a40be5e93832148608aabb7ca81c | |
parent | 0ed095e47d6ba29942e46fce1efc73f6b13e5445 (diff) |
Refs #3637 adding new feature thx EricCG for patch + suggestion!
; By default when user logs out he is redirected to Piwik "homepage" usually the Login form.
; Uncomment the next line to set a URL to redirect the user to after he logs out of Piwik.
; login_logout_url = http://...
git-svn-id: http://dev.piwik.org/svn/trunk@7711 59fd770c-687e-43c8-a1e3-f5a4ff64c105
-rw-r--r-- | config/global.ini.php | 4 | ||||
-rw-r--r-- | plugins/Login/Controller.php | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/config/global.ini.php b/config/global.ini.php index 8cbc6b95f3..a85e72aa1f 100644 --- a/config/global.ini.php +++ b/config/global.ini.php @@ -199,6 +199,10 @@ login_password_recovery_email_address = "password-recovery@{DOMAIN}" ; name that appears as a Sender in the password recovery email login_password_recovery_email_name = Piwik +; By default when user logs out he is redirected to Piwik "homepage" usually the Login form. +; Uncomment the next line to set a URL to redirect the user to after he logs out of Piwik. +; login_logout_url = http://... + ; Set to 1 to disable the framebuster on standard Non-widgets pages (a click-jacking countermeasure). ; Default is 0 (i.e., bust frames on all non Widget pages such as Login, API, Widgets, Email reports, etc.). enable_framed_pages = 0 diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 5848a96f6d..d6ec3afa70 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -495,7 +495,13 @@ class Piwik_Login_Controller extends Piwik_Controller public function logout() { self::clearSession(); - Piwik::redirectToModule('CoreHome'); + + $logoutUrl = Piwik_Config::getInstance()->General['login_logout_url']; + if(empty($logoutUrl)) { + Piwik::redirectToModule('CoreHome'); + } else { + Piwik_Url::redirectToUrl($logoutUrl); + } } /** |