Function
Filter the contents of the welcome email.
tml_ms_filter_welcome_email( string $message, int $blog_id, int $user_id, string $password )
Parameters
-
$messagestring - The welcome email message.
-
$blog_idint - The blog ID.
-
$user_idint - The user ID.
-
$passwordstring - 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
| Version | Description |
|---|---|
| 7.0 | Introduced. |