Add email addresses to already registered users
Doing This For a Single User In The user_register Filter Instead of using get_userdata in your filter, fetch the user itself as a WP_User object via get_user_by: $user = get_user_by( ‘id’, $user_id ); This gives you access to all of the fields of WP_User directly, e.g.: echo $user->user_login; Which you can then plug into your … Read more