Hi there,
Well I had seen a lot of posts on the forum about people wanting to be able to re-direct users upon logging out of the system to a page of their choosing so thought I would take the dark plunge into writing my first extensions.
Attached is V1.1 of the Logout Redirect extension and also V1.1 of the Login Redirect extension. These are very very simple and at the moment has just the one extension setting where you can provide a URL that you would like a user to be re-directed to upon successful log-in or log-out depending on which extension you are using.
You should be able to use both extensions at the same time as they shouldn’t conflict with one another as far as I know.
I hope to improve these extensions so that they could somehow be created as plugins instead so that people would be able to set the URL in there instead of the extension settings so that you could have endless redirect paths if you so desired. That’s a bit above my head for now though so I am submitting these as they are.
I hope that I have done the right thing in posting this here like this. If I haven’t then please (moderators) don’t hesitate to slap my hands or whatever as I have never done this before so any help with the correct procedure will be appreciated.
Also if maybe one of the EE admin crew could possibly look these over and make sure that it adheres to the EE coding guide-lines and that they aren’t going to cause any damage anywhere then that would also be massively appreciated.
DISCLAIMER - Please use these extension at your own risk for now as they have not been checked by anyone other than myself
Best wishes,
Mark
Installation Instructions
Download the preferred extension file from the bottom of this post. Un-zip it and follow the same directory structure as the download to place the files into their correct locations inside your EE system.
Goto your Extensions Manager in the EE admin panel and enable extensions (if they are not already enabled). Next enable the Login Redirect or Logout Redirect extension (both if you wish!!).
Click on the settings link for each extension that you have installed and fill in the URL to redirect to.That’s it!!
As pointed out to my hair brained self there is actually already a return parameter in the login form so you can pretty much do away with the Login Redirect extension as it probably won’t be needed by anyone after-all but hopefully the Logout Redirect extension should come in handy as that was the extension that I first made due to people needing this functionality which at the moment (I do stand to be corrected on this one though) doesn’t exist.
Mod Edit: Attachments removed. Please review the license.
