bp_members_invitations_cancel_activation_email( bool $send, int $user_id, string $user_email = '', string $activation_key = '', array $usermeta = array() )

When a user joins the network via an invitation, skip sending the activation email.


Parameters Parameters

$send

(bool) (Required) Whether or not to send the activation key.

$user_id

(int) (Required) User ID to send activation key to.

$user_email

(string) (Optional) User email to send activation key to.

Default value: ''

$activation_key

(string) (Optional) Activation key to be sent.

Default value: ''

$usermeta

(array) (Optional) Miscellaneous metadata about the user (blog-specific signup data, xprofile data, etc).

Default value: array()


Top ↑

Return Return

(bool) Whether or not to send the activation key.


Source Source

File: bp-members/bp-members-invitations.php

function bp_members_invitations_cancel_activation_email( $send, $user_id = 0, $user_email = '', $activation_key = '', $usermeta = array() ) {
	$invite = bp_members_invitations_get_invites(
		array(
			'invitee_email' => $user_email,
			'invite_sent'   => 'sent'
		)
	);

	if ( $invite ) {
		$send = false;
	}

	return $send;
}


Top ↑

Changelog Changelog

Changelog
Version Description
8.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.