caseproof / members

Members WordPress plugin.
GNU General Public License v2.0
78 stars 35 forks source link

Action when chaging user role #120

Open lufemas opened 6 months ago

lufemas commented 6 months ago

I need to send an email if the a specific role is attribuited to an user. However the default wordpress action 'set_user_role' seems not to be called when using 'members'. Also the:

do_action( ‘profile_update’, int $user_id, WP_User $old_user_data, array $userdata )

does not carry the new attribued role ( and neither can I retrieve using the $user_id, because at this point the user seems to still have the old roles).

Is there an action not documented called when changing, adding, editing an user's role? Looking trhought the code I could not see it.