Skip to content

Function

Filter the contents of the welcome email.

tml_ms_filter_welcome_email( string $message, int $blog_id, int $user_id, string $password )

Parameters

$message string
The welcome email message.
$blog_id int
The blog ID.
$user_id int
The user ID.
$password string
The user password.

Return

string The welcome email message.

Source

function tml_ms_filter_welcome_email( $message, $blog_id, $user_id, $password ) {
    $user            = get_userdata( $user_id );
    $chosen_password = tml_ms_get_activation_password();
    if ( '' !== $chosen_password ) {
        $message = str_replace( $password, $chosen_password, $message );
    }
    if ( tml_is_email_login_type() ) {
        $message = str_replace( $user->user_login, $user->user_email, $message );
    }
    return $message;
}

Uses

Changelog

VersionDescription
7.0 Introduced.