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 /plugins/Login | |
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
Diffstat (limited to 'plugins/Login')
-rw-r--r-- | plugins/Login/Controller.php | 8 |
1 files changed, 7 insertions, 1 deletions
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); + } } /** |