Skip to content
Docs
Get RestroPress

Filter

rpress_user_registration_email_username

Updated
On this page

Filters the username line of the welcome email.

Runs in rpress_new_user_notification() and sets the start of the email message. The default is 'Username: ' followed by the login name and a line break.

Parameters#

ParameterTypeDescription
$username_linestringUsername line text, ending with a line break.
$user_dataarrayUser data array for the new account, including user_login and user_email.

Return value#

string. Text that begins the welcome email message.

Example#

function my_welcome_username_line( $username_line, $user_data ) {
	return sprintf( 'Your login: %s', $user_data['user_login'] ) . "\r\n";
}
add_filter( 'rpress_user_registration_email_username', 'my_welcome_username_line', 10, 2 );

Source#

Applied in:

  • includes/user-functions.php (line 524), in rpress_new_user_notification()

See also#

Was this page helpful?