Fires immediately after an existing user is invited to join the site, but before the notification is sent.
$user_idint$rolearray$newuser_keystringwp-admin/user-new.php:113file scope<?php * @since 4.4.0 * * @param int $user_id The invited user's ID. * @param array $role Array containing role information for the invited user. * @param string $newuser_key The key of the invitation. */ do_action( 'invite_user', $user_id, $role, $newuser_key ); $switched_locale = switch_to_user_locale( $user_id ); if ( '' !== get_option( 'blogname' ) ) { $site_title = wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ); } else {Introduced in 4.4.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.