Topic RSS
We are using MagicMembers software for our membership site, and want to restrict access to our forum for some users who have only bought an intro product. I can easily identify them using this code:
$mgm_user_data = get_user_option('mgm_user');
if($mgm_user_data->account_type != 'AccountTypeA')
{
/* Restrict access here */
}
I have tried to put some of this code in sf_extend_current_user() , but can't seem to get the right mix of $current_user->member, ->guest, etc.
Any insight as to where I might put some code like this, to treat those members as if they are not even logged into the forum (i.e. show "You must be logged in to post", "Access Denied" screen)?
For these members, we don't even show a /forum link, but if they somehow make it there, we need to prevent all access.
Why can't you use the built in permissions/user groups and roles? It will do a much better job than trying to hack code…
I guess I'm not clear on how to make the connection between product purchased and SPF User Group. If I create two new SPF User Groups, one for each product, is there an automated way to add the users to their respective User Group? Currently, any user that buys a product has WordPress Role 'Subscriber'. Do I need to create a new WordPress role per product, and then have the WordPress role map to an SPF User Group?
there is provide your product implementation uses the standard wp api for roles… you can map a role to a sp user group… this can be set up to auto occur too… see forum – options – member settings…
Most Users Ever Online: 444
Currently Online: chaiavi, steve.engelking
69 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
-Radio-: 1251
Lee H: 606
Luffer: 535
Conrad_Farlow: 502
jim: 478
neon: 263
ovizii: 240
Tal: 240
Member Stats:
Guest Posters: 2625
Members: 7361
Moderators: 1
Admins: 2
Forum Stats:
Groups: 5
Forums: 16
Topics: 10890
Posts: 79531
Newest Members: ndc, MacBravO, irlandes1, triphop, betokan, Jonathan Yovani Muñoz, somosguatemala, ahcreate, eatonrabbit, prasanna
Moderators: Brandon C (162)
Administrators: Yellow Swordfish (22211), Mr Papa (23688)
Log In
Register
Home
Add Reply
Add Topic
Offline
Quote




Visit 
Privacy Policy



