Membership Plugin Question
14 posts by 2 authors in: Forums > CMS Builder
Last Post: September 12, 2012 (RSS)
By meg - September 7, 2012
Re: [meg] Membership Plugin Question
By Jason - September 10, 2012
No problem. The way I normally set this up is to have the plugin redirect all users to a single "launching" page. All this page does is figure out what user level they are and redirects them.
EXAMPLE:
if (!$CURRENT_USER) { websiteLogin_redirectToLogin(); exit; }
$url = "";
if ($CURRENT_USER['user_type'] == 1) {
$url = "profile.php";
}
elseif ($CURRENT_USER['user_type'] == 2) {
$url = "admin.php";
}
else {
$url = "homepage.php";
}
redirectBrowserToURL($url);
exit;
In this example, if "user_type" was 1, they are redirected to profile.php. If its 2, they're redirected to admin.php. If they have anything else, they get sent to homepage.php.
Hope this helps get you started
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Membership Plugin Question
By meg - September 10, 2012
Re: [meg] Membership Plugin Question
By Jason - September 10, 2012
You can create a field called "user_type" in the accounts section and give a value to each user.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Membership Plugin Question
By meg - September 10, 2012
Re: [Jason] Membership Plugin Question
By meg - September 10, 2012
Re: [meg] Membership Plugin Question
By Jason - September 10, 2012
What you would do is create a separate PHP file (example: launchPage.php) and you would set this page in your website membership plugin:
example:
$GLOBALS['WEBSITE_LOGIN_POST_LOGIN_URL'] = 'launchPage.php';
So everyone, after they login, will get redirected to this page. then this page will redirect them again, based on their user type.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Membership Plugin Question
By meg - September 11, 2012
Re: [meg] Membership Plugin Question
By Jason - September 12, 2012
Sorry, it looks like your file didn't get attached. could you please repost this?
Thanks
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/