Membership access to some or all pages

By ScottL - July 30, 2010

Here's what I'm trying to accomplish:

My client offers 8 different insurance programs - a member will be granted access to view any number of them - one, some, or all. Each insurance program will simply be a single Detail page

Ideally, when a user logs-in, they are forwarded to their landing page showing a list of "Insurance Programs" available to them.

My client will "signup" a member and designate access via checkboxes. I see how the list is created in the User editor with checkboxes (multi value) and list options.

What code do I need to confirm membership level after login that displays a formatted landing page with links to respective areas?


Thanks

Re: [thinkng] Membership access to some or all pages

By Jason - July 30, 2010

Hi,

If you're using the membership plugin, and your storing their "Membership level" in the accounts table, you should be able to access this variable using $CURRENT_USER['*FIELD NAME*'] where *FIELD NAME* is the name of the field in the accounts table that your storing their membership level in.

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 access to some or all pages

Sort of along the same lines, in the sign up area, you have the instructions:

''replace '_sample' with the table you want the user to access
replace '6' with the access level they should have: 0=none, 6=author, 9=editor
replace '1' with the max listings they are allowed"

I'm not show how this translates into someone accessing a members only area of a site.

For example, our client is an association. Members with logins will be able to access a front end with information, forms, and other things that general members and non-members can't get to.

- Does this mean that I have to add all the tables for that area of the site to those users?
- Do I list them with commas or does each table require a separate line?
- Does access level 'none' mean that they can't access that area at all or just that they can't sign into the CMS backend?
- What does the max listings line mean?

Thanks.
-----
~Jessica Sullivan, Crystal Realm Designs.

Re: [Jason] Membership access to some or all pages

That's exactly what I was hoping for. LOL... thanks! [cool]
-----
~Jessica Sullivan, Crystal Realm Designs.

Re: [Duches77] Membership access to some or all pages

By khimcole - October 3, 2010

thanks alot guys! This really enlightens me on what to do on website. I have tried a lot of plugins already...