bp_members_invitations_make_registration_email_input_readonly_if_invite( array $attributes, string $name )

Do not allow the new user to change the email address if they are accepting a community invitation.


Parameters Parameters

$attributes

(array) (Required) The field attributes.

$name

(string) (Required) The field name.


Top ↑

Return Return

(array) $attributes The field attributes.


Source Source

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

function bp_members_invitations_make_registration_email_input_readonly_if_invite( $attributes, $name ) {
	if ( 'email' === $name && bp_get_members_invitations_allowed() ) {
		$invite = bp_get_members_invitation_from_request();
		if ( $invite->id ) {
			$attributes['readonly'] = 'readonly';
		}
	}
	return $attributes;
}


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.