Support Forum

sp_add_membership($usergroup_id, $user_id)

SD Stan Dahl
Stan Dahl
Member

Hi,

Two quick questions on this:

1) what do these functions return?

sp_add_membership($usergroup_id, $user_id)

sp_remove_membership($usergroup_id, $user_id)

2) I take it $user_id is the same as the WP User Id?

Thanks for your help!

1 Answer

New Answer

YS Yellow Swordfish
Yellow Swordfish
Member

sp_add_membership() returns a true or false determined by the success of the operation.

sp_remove_membership() will always return a true as it can not really fail!

And user_id is the global users ID as created when they first registered for the site.