AUTO LOGOFF WITH REDIRECT - Apr 1st, 2017


In the Website Membership Plugin I had my post_logoff page set to a generic "log-out" page.

I was having trouble automatically logging a user out of the system and then automatically redirecting them to a special
"log-out" page after they updated their profile.

Dave Edis, Senior Guru at Interactive Tools reminded me that the user_logoff() is an internal CMSB function and takes an
optional redirect url as an argument.

So, in your profile update form, search for:


### Change Password


Before the brace "}" that precedes ### Change Password, insert the code


### Automatic Log Off and Redirect
user_logoff("http://www.my_site.com/logout_index.php");


That will execute the logoff and redirect after the profile has been updated.



The materials on this web site have been created for use with CMS Builder content management software. CMS Builder software is published and licensed for use by InteractiveTools.com. Please contact Interactive Tools for information on the downloading of the software or the purchasing of licenses.


Terms of Service