Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
new members not set to group "member"
Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 29, 2013 - 1:50 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Adewale Olaore
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2013 - 2:22 pm

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?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 29, 2013 - 4:03 pm

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.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2013 - 5:52 pm

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/.....ip-plugin/

Avatar
Denis Courtin
Member
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2013 - 10:02 pm

buddypress 1.7.2 is only 2 months old if not less

I plan to update to 1.8 very soon

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jul 29, 2013 - 10:27 pm

no, the bp version is fine...  still no clue why its seemingly firing wp hooks for you...  we have tons of BP users so seems something one off...  have not had chance to test BP myself now...

Avatar
Adewale Olaore
Member
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2013 - 5:44 am

Mr. Papa, you are right. I am actually just changing roles. I have everything set up right. There is only one question, does user group name allow space in between?

To answer your question above, members_leve1 role in WP is assigned to Members Level 1 in SP. Could the space in between the usergroup name be responsible?

 

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 30, 2013 - 5:48 am

Spaces are fine. Underneath the hood, it is the numeric ID that is used in all processing.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Adewale Olaore
Member
Free Members
sp_UserOfflineSmall Offline
Jul 30, 2013 - 6:04 am

Please find attached my User Groups - User Mapping Settings screenshot, is there anything I am doing wrong.user_mapping_screen.pngImage Enlarger

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jul 30, 2013 - 6:13 am

Looks OK to me. But - reading back through the thread - I don't understand what it is that is wrong?

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625