Support Forum

new members not set to group "member"

DC Denis Courtin
Denis Courtin
Member

Hi

My new users are “no membership assigned”, while in Forum -> Usergroup > Map Users to Usergroups they are correctly set as “new members” = “member role”

I read in the faq it can be caused by a plugin, but it’s difficult to troubleshoot, any idea what/where I should start looking for ?

36 Answers

New Answer

MP Mr Papa
Mr Papa
Member

how are new users added to wp?  normal registration?  or do you have a membership plugin?  most membership plugins work fine with sp… they just need to follow the wp rules and api…  when wp creates a new user, specific hooks and actions are fired so that themes/plugins are aware of the new user…  if the membership plugin is operating outside the wp api and those hooks/actions are not fired, we have no way of knowing that a new user was added…  its wp, just use the wp api…

a good test…  go to wp – users – add user and add a new user through the wp users admin panel (not the membership plugin)… does the user get created?  and does it get the right usergroup setting?

DC Denis Courtin
Denis Courtin
Member

Hi Mr Papa,

Thanks for fast answer

Just tried :
“go to wp – users – add user and add a new user through the wp users admin panel (not the membership plugin)… does the user get created?  and does it get the right usergroup setting?”

Result :
User created and went to correct group

I’m using the usual buddypress registration. http://www.warlegend.net/register/

I’m using a plugin so that the buddypress displayed name is the login and not the “display name”, maybe it’s conflicting ?

BuddyPress Usernames Only

Override display names across your BuddyPress site with usernames.

http://wordpress.org/plugins/buddypress-usernames-only/

The only other conflicting cookie maybe is :

root Cookie

Changes the cookie default path to / (i.e. the whole domain.com not just domain.com/blog) with an option to go across subdomains

http://wordpress.org/plugins/root-cookie/

Or last maybe, something in my custom theme ?

MP Mr Papa
Mr Papa
Member

its a good indication that the registration plugin is operating outside the wp api and doing its own thing…  I dont think the other two would be involved…

If a plugin is not following wp standards, not sure what we can do…  is this built in to buddypress or an add on for it????   hard to believe BP itself would be outside the wp api… 

DC Denis Courtin
Denis Courtin
Member

The normal behaviour is that if I add an user from the admin panel it will not be in a group ?

BuddyPress Usernames Only is an plugin for buddypress yes

i can try to disable it and test again, will do so today

MP Mr Papa
Mr Papa
Member

no, I was asking if buddypress registration was a plugin for BP or just standard BP?

DC Denis Courtin
Denis Courtin
Member

no plugin, standard buddypress registration page, check http://www.warlegend.net/register/ (yeah it’s in French but it’s usual buddypress stuff! login, email, password, display name…:D)

Just tried to disable the plugin BuddyPress Usernames Only

->Same issue with new users :(

 

YS Yellow Swordfish
Yellow Swordfish
Member

Is this an up to date version of BP you are using? Or is it older?

AO Adewale Olaore
Adewale Olaore
Member

I am using a membership plugin. How do I get users assigned to a usergorup. When users register, they are assigned a default wp_role of subscriber, but after they make payments, I have a custom script written to upgrade their wp-role to members_level1. I want to be able to add them to a user group at the point where they make payment for membership access, not at registration.

Is there a function to call to assign the simple press usergroup?

YS Yellow Swordfish
Yellow Swordfish
Member

Denis: There was at least one version of BuddyPress that did not correctly call the WP API after a new member registered but I really do not know which version it was. We seemed to get reports of this probably a year ago – maybe a little longer. I really don’t know, of course, but it might just be that simple – that your BP isn’t doing things correctly and needs to also be upgraded.

Adewale: New users are notified to SP via the WP API – new user sign-up is supposed to call the necessary WordPress hooks which Simple:Press and other plugins tie into the get the news. If this is not happening then either your membership plugin or your own code is not making these calls.

AO Adewale Olaore
Adewale Olaore
Member

Yellow Swordfish: Thanks for the prompt response.

Let me give you the code I call on when users buy a membership package and their payment is confirmed. I run something like:

function run_on_purchase_complete() {
…… 

$user = new WP_User( $user_id );

if( ! $user ) continue;

if( $download[‘id’] == 340 ) { // Add custom role $user->add_role( ‘members_level1’ );

}

}

Of course the role members_level1 has been created already, and I just want add the user group to the usergroup forum_level1 at the point I am adding the members_level1 role.

So how do I go about this?

YS Yellow Swordfish
Yellow Swordfish
Member

Well – the WordPress add new user routine calls this action hook:

do_action('user_register', $user_id);

and that is really what your code should do.

MP Mr Papa
Mr Papa
Member

Adewale, stepping back a second…  you are just changing the role of user?  have you mapped this role to a specific usergroup with the permissions you want??  if you change subscriber to level1, what sp user group is level 1 mapped to??

you do the wp role to sp user group mapping on forum – user groups – map users to user groups…

also see:  http://codex.simple-press.com/codex/faq/problem-with-post-edit-buttonow-to/problem-with-post-edit-buttonow-to-configure-simple-press-with-membership-plugin/

DC Denis Courtin
Denis Courtin
Member

buddypress 1.7.2 is only 2 months old if not less

I plan to update to 1.8 very soon