Support » Plugin: Members » action hook when role changes

  • Is there an action hook, when role of a user role changes. For me the standart wordpress hook set_user_role does not fire.
    The profile_update does fire but gives the same roles on the $old_user_data and new user data (receved by get_userdata($user_id)). When i set the priority to 10 (and probably also lower), it gives the old ones and when setting it to 11 (or higher) it gives the new ones.

    When I’m right, then in between those priorities the hook
    add_action( 'profile_update', array( $this, 'role_update' ), 10, 2 ); from members\admin\class-user-edit.php gets fired.
    Is there a hook somewhere or must i Hack in there with some temporary variable to store the old data by a hook with lover priority and read to compare by a hook with higher priority? (Or does anyone have a better Idea on how to do this)

    • This topic was modified 1 year, 1 month ago by  grebos.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘action hook when role changes’ is closed to new replies.