Support Forum
I have my site set up to map new users to a custom Wordpress role (managed by the Memberpress plugin), and there is a corresponding User Group in Simplepress, with a 1-to-1 mapping.
New users are correctly getting their custom role, and being mapped into the corresponding SP User Group, however they are also going into Guests. It isn't causing any permissions issues, however, it then displays their main custom role AND "Guests" in their profile on messages.
I can't figure out how prevent these new registrants from being assigned to the Guests group.
Also, is it "safe" to remove them from Guests by moving them from Guest to their custom group, which seems to remove them and not affect anything? The DELETE from role function doesn't do anything even if they are members of another group.
Thanks,
Kelly
Needless to say this is not something we have heard happening before and a quick check ensures we can not replicate either! So - puzzling.
Can I assume that on your user group mapping admin panel, the 'Default user group for 'guests' IS in fact the 'Guests' user group and the default for 'Members' is 'Members'? And if that is the case and, for some reason, it wanted to put them in to two groups it should be Members not Guests!
The only logical explanation I can come up with here is that MemberPress is making two calls - one when the user registers and is not yet an actual member of the website - and again after the registration process is verified - by which time they are a member and have a WP role. It would be worth asking the MemberPress team if this might be the case. Well - the exact question would be are they firing the WP new user hooks twice. I would argue that they should not be fired until registration is verified.
So - if that is happening and MemberPress can correct this that would solve the problem. But...
Have you tried checking the option to only allow users in a single user group? Or do you need this option turned off for the way you arrange things? If this is turned on then user group assignment will perform a 'move' operation if the specified user is already in a different user group.
As to manually moving and/or deleting then again, I can not replicate any issues with deleting a user from a group. Can you talk me through what you are doing, step by step, to try and do this?
YELLOW
SWORDFISH
|
Ok, I think I found the cause of the double groups. When setting a Memberpress membership to set a custom role, it sets it as a secondary role; the user created ALSO gets the Primary role as set in the Wordpress settings for the default user role.
In my case, the Wordpress default user role is "subscriber" which I had mapped to "Guest" in Simplepress. My membership scheme is set up so that a membership is required in order to access the forums, and it will always be based on a custom user role; so a "subscriber" would not normally be a valid user with any access.
It is fair to say that Memberpress is the "cause" of my problem, however it would be a nice Simplepress feature (and be a workaround for my Memberpress issue) to be able to map default SP user groups to "no usergroup membership" instead of having to assign one for each and every existing role. For instance, it would be great to map "Subscriber" to "No membership" in SP.
I have submitted a support request to Memberpress about the dual-settings, as their docs imply only 1 role is set when using custom user roles.
Now that we know what is going on here, I'll make a separate posting about my inability to delete someone from a group in SP after I reconfirm what is happening and document it.
Thanks,
Kelly
Yes, that works as far as permissions go because being in a group with "no rights" doesn't impede the user from getting rights form the additional membership group. However, the problem for me is that it then lists the member as part of both groups in their profile, using the name of the group. So the subtle difference here is between being in an extra group with no rights vs. not being in an extra group...
Thanks,
Kelly
not a lot we can do with the membership plugin doing things a bit non standard (but of course supported by wp)...
we do have a filter on the membership display routine so you can use that to remove the one that you dont want to show... we can provide some guidance on this if you want to do it..
and the members list also allows you to exclude a usergroup...
Visit Cruise Talk Central and Mr Papa's World
I got clarification from Memberpress that they do indeed set two roles if using their custom roles add-on; they don't want to change that behavior as they feel many customers use it.& it will break them.
I am going to play with solving this for me by one of two ways:
1. Map the default user role of "subscriber" to the SP "Member" group (which won't have any forum access permissions); user will get permissions from their custom role, and the badge I'll show for the member will relate to the custom role/user group. So on the default reboot theme it will show their badge (for the custom role), and the word "Member" below.
OR
2. Filter the membership display as you mention so only the custom roles that I've assigned badges to will show. This all depends on what determines which user group shows... is it alphabetic? Primary Group? I'd need to figure out how to just show the secondary group.
You also just mentioned something I didn't know: "and the members list also allows you to exclude a usergroup"; I'll look at this too and see how that might help.
Thanks!
Kelly
depends on how fancy you want to get...
using the filter 'sph_UserMemberships' you could simply replace the usergroup name with a blank string...
or you could search for usergroup in the filter string and then 'back up' to the p tag element and add a display:none...
both those assume you know the name of the usergroup you want to hide - from your posts, I thought that was known...
for the members list, see the members view class, instantiated by
sp_has_member_groups($groupBy='usergroup', $orderBy='id', $sortBy='asc', $number=15, $limitUG=false, $ugids='')
in the spMembersView.php template file, the last argument lets specifically list the usergroup IDs you want list (rest will be hidden)...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)