Forum Replies Created

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

    (@fishmarketing)

    Thanks for getting back to me on this.

    I found that the new_user_approve_user_approved action passes along a user Object so I didn’t have to establish a new one. The code that worked for me is slightly different than what I posted:

    add_action( 'new_user_approve_user_approved', 'change_user_confirmed_group');
    
    function change_user_confirmed_group( $user ) {
    
    		$user_role = $user->roles[0];
    		$user_id = $user->ID;
    
                    ...assign group to user based on role
    }
Viewing 1 replies (of 1 total)