Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure destination URL, after user logout of Piwik #3637

Closed
BrainCrumbz opened this issue Dec 22, 2012 · 5 comments
Closed

How to configure destination URL, after user logout of Piwik #3637

BrainCrumbz opened this issue Dec 22, 2012 · 5 comments
Assignees
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@BrainCrumbz
Copy link

Hello all.
One of our customers has a requirement to redirect the user to a specific URL after s/he logs out.

After some research, we see that the destination is fixed to Piwik::redirectToModule('CoreHome'); within Piwik_Login_Controller.logout action in Login plugin.

First preliminary question: is this an interesting feature that could go into Piwik code-base?

If so, we'd like to change the code so that it can be suitable for submission.

One option would be to change that same method in Login plugin, and take advantage of a new configuration variable. The change in pseudo-code would be:

get value for configuration variable named "logout_redirect_URL"
if variable not found, or value empty then
   redirect to module CoreHome, as default
else
   redirect to URL specified in configuration

The second option would be to inherit a new plugin from Login, say ConfigurableLogin, and override just the logout method in the same proposed way.

Have you got any suggestion about it?

Thanks all
Keywords: login logout redirect

@anonymous-matomo-user
Copy link

@mattab
Copy link
Member

mattab commented Jan 2, 2013

Add a FAQ

 * How do I configure the URL users are redirect to after logging out of Piwik?

By default when a user logs out of Piwik, he is redirected to Piwik "homepage" which is usually the Login form. You can also specify the URL to redirect the users to in your config file and overwrite the default Piwik behavior. 

For example, to redirect all your users to example.org after logout, edit your file config/config.ini.php and under the [General] section add the following line: 

<pre>login_logout_url = http://example.org</pre>

@mattab
Copy link
Member

mattab commented Jan 2, 2013

(In [7711]) 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://...

@BrainCrumbz
Copy link
Author

That looks great!
Thanks to EricCG and to Matt for your responses.

@mattab
Copy link
Member

mattab commented Apr 11, 2013

@BrainCrumbz BrainCrumbz added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

3 participants