• Resolved dsjohnson

    (@dsjohnson)


    I need to detect when a uses role is changed. I should be able to:

    add_action( 'set_user_role', function( $user_id, $role, $old_roles ) 
    {
        //  code ...
    
    }, 10, 3 );

    However with Members activated ‘set_user_role’ appears to not fire when a role is changed. Disabling Member allows it to fire, but then I am back to only being able to give a user one role. Is there a hook in members that would allow me to detect when a role is changed.

Viewing 1 replies (of 1 total)
  • Thread Starter dsjohnson

    (@dsjohnson)

    It looks like I can do what I need to do with the ‘profile_update’ hook.

    Note: other multiple role plugins have the same effect.

Viewing 1 replies (of 1 total)
  • The topic ‘set_user_role’ is closed to new replies.