Support Forum
Yellow Swordfish said
No that's not normal. Normal would see a member just be assigned to a different group while keeping the original group membership. And again - we do have a lot of users with this setup. Back t the action hooks... are they being fired correctly?
I think it is a problem of "user role editor" plugin to assign multiple wp roles. However i cannot disable it . [OT] It's a huge limitation for a CMS to not allow flexible ACL by default . I miss joomla in this case [/OT]
However i've a workaround but i'm searching for an function that allows me to add/remove users from a group programmatically.
Is there anything similar?
Where can i find a documented list of function to avoid bothering you next time?
We are slowly getting all of the API documented in the codex but it is slow work and sadly not yet complete.
I think the function you need is:
sp_map_role_to_ug($userid, $role)
if I am wrong there I am sure @mr-papa will ome and post a correction!
This is in the sp-api-users,php file by the way
YELLOW
SWORDFISH
|
wait... you want to remove/add users to a simple press user group? then it would be:
sp_add_membership($usergroup_id, $user_id)
and
sp_remove_membership($usergroup_id, $user_id)
the function @yellow-swordfish gave you would take all users for a specific wp user role and give them membership in a usergroup...
so depends on what you want to do programmatically...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)