REDIRECTING CURRENT USERS BASED ON THEIR MEMBER TYPE - Oct 5th, 2011


User John from JAM Graphics wanted to know if there was an easy way to redirect the retailer sales rep "members" to
different parts of a website on login.

Robin Brayer from Interactive Tools came up with this simple answer:

If you add a "type" menu to the accounts section, that data will automatically be added to the CURRENT_USER variable
($CURRENT_USER['type']). You can use that to verify a users type at the top of a page.

On login, you can set your website membership "WEBSITE_LOGIN_POST_LOGIN_URL" to direct to something like
"logindispatch.php". Then redirect users from there to the correct place. e.g. The code might look something like:


if($CURRENT_USER['type']=='retailer') {
redirectBrowserToURL('retailerpage.php');
}





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