Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
sp_add_membership($usergroup_id, $user_id)
Avatar
Stan Dahl
Member
Free Members
sp_UserOfflineSmall Offline
Oct 19, 2015 - 2:34 pm

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!

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Oct 19, 2015 - 3:24 pm

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.

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: 649
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 616
Members: 17344
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10117
Posts: 79600