Changing role no longer fires the set_user_role hook
-
Hi!
I was using Members on a new site I’m working on and, one of the features is that users can register and are added in the default subscriber role on registration (nothing out of the ordinary here). But, after that, following offline procedures, an admin will go in and change the user’s role from Subscriber to a custom role named “member” and, when they do I have a function tied to the set_user_role hook (https://codex.www.ads-software.com/Plugin_API/Action_Reference/set_user_role) that sends two emails if and only if the new role is “member”.
One email goes to an admin email for confirmation and one to the user telling them their status has changed on the site.
This worked great up to the 1.x version but now, this hook doesn’t seem to be firing at all since Members 1.x replaced the native user role drop down select field with a checkbox field to enable the selection of multiple roles. for a single user.
Was that by design? If not I guess this is a bug ?? If it is by design, is there another hook I can use to do the same thing? Maybe a Members specific hook?
Thanks! Love the new version otherwise ??
- The topic ‘Changing role no longer fires the set_user_role hook’ is closed to new replies.