invite_user WordPress Action Hook

The invite_user hook allows you to programmatically invite a user to your site. This hook is useful for creating an automated process for inviting users to your site.

do_action( 'invite_user', int $user_id, array $role, string $newuser_key ) #

Fires immediately after an existing user is invited to join the site, but before the notification is sent.


Parameters

$user_id

(int)The invited user's ID.

$role

(array)Array containing role information for the invited user.

$newuser_key

(string)The key of the invitation.


Top ↑

Source

File: wp-admin/user-new.php

View on Trac


Top ↑

Changelog

Changelog
VersionDescription
4.4.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.