How to set specific custom membergroups during integrate_validate_login

Started by ssmith, June 25, 2016, 03:25:41 PM

Previous topic - Next topic

ssmith

Greetings -
Our club is running SMF 2.0.11, with a custom integration by SlammedDime. Seems he hasn't been online and I'm helping the club by taking a whack at adding a small bit of desired additional functionality. Be gentle... I'm new to SMF and Php, but I used to write embedded systems code in C.

Club membership is managed via a web based SaaS. SMF integration validates users via a SOAP interface on the membership system. Works good. The desired add is to be able to control SMF content based on membership levels (ie forum only, full member). Seems best way is assigning users to custom membergroups. We know the member access level during the integrate_validate_login hook process. My thought is the best time to separate users into the buckets is when they log in - this will support existing users and new users, and allow flexible if the need arises in the future to force users to new membergroups. I've tried using addMembersToGroup, but it seems that this is only works for admin level, and when the integration is called it is user level. Seems we need to be able to retain previous membergroups, but set a new primary Private membergroup to a user based on info from the other system. It should be able to set a new primary membergroup in the case where a user changes their access level up or down. 

Thanks much

Advertisement: