# wpmu_welcome_user_notification()

URL: https://chugunov.pro/api-wordpress/functions/wpmu_welcome_user_notification/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: MU (3.0.0).

## Сигнатура

```php
wpmu_welcome_user_notification( int $user_id, string $password, array $meta = array() ): bool
```

## Описание

Используйте фильтр 'wpmu_welcome_user_notification', чтобы отключить или обойти уведомление.
Используйте фильтры 'update_welcome_user_email' и 'update_welcome_user_subject', чтобы изменить содержимое и тему письма-уведомления.

## Параметры

- `$user_id` `int` — обязательный. ID пользователя.
- `$password` `string` — обязательный. Пароль пользователя.
- `$meta` `array` — необязательный, по умолчанию `array()`. Метаданные регистрации.

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/ms-functions.php:1878`

```php
function wpmu_welcome_user_notification(
	$user_id,
	#[\SensitiveParameter]
	$password,
	$meta = array()
) {
	$current_network = get_network();

	/**
	 * Filters whether to bypass the welcome email after user activation.
	 *
	 * Returning false disables the welcome email.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param int    $user_id  User ID.
	 * @param string $password User password.
	 * @param array  $meta     Signup meta data. Default empty array.
	 */
	if ( ! apply_filters( 'wpmu_welcome_user_notification', $user_id, $password, $meta ) ) {
		return false;
	}

	$welcome_email = get_site_option( 'welcome_user_email' );

	$user = get_userdata( $user_id );

	$switched_locale = switch_to_user_locale( $user_id );

	/**
	 * Filters the content of the welcome email after user activation.
	 *
	 * Content should be formatted for transmission via wp_mail().
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string $welcome_email The message body of the account activation success email.
	 * @param int    $user_id       User ID.
	 * @param string $password      User password.
	 * @param array  $meta          Signup meta data. Default empty array.
	 */
	$welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta );
	$welcome_email = str_replace( 'SITE_NAME', $current_network->site_name, $welcome_email );
	$welcome_email = str_replace( 'USERNAME', $user->user_login, $welcome_email );
	$welcome_email = str_replace( 'PASSWORD', $password, $welcome_email );
	$welcome_email = str_replace( 'LOGINLINK', wp_login_url(), $welcome_email );

	$admin_email = get_site_option( 'admin_email' );

	if ( '' === $admin_email ) {
		$admin_email = 'support@' . wp_parse_url( network_home_url(), PHP_URL_HOST );
	}

	$from_name       = ( '' !== get_site_option( 'site_name' ) ) ? esc_html( get_site_option( 'site_name' ) ) : 'WordPress';
	$message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . 'Content-Type: text/plain; charset="' . get_option( 'blog_charset' ) . "\"\n";
	$message         = $welcome_email;

	if ( empty( $current_network->site_name ) ) {
		$current_network->site_name = 'WordPress';
	}

	/* translators: New user notification email subject. 1: Network title, 2: New user login. */
	$subject = __( 'New %1$s User: %2$s' );

	/**
	 * Filters the subject of the welcome email after user activation.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param string $subject Subject of the email.
	 */
	$subject = apply_filters( 'update_welcome_user_subject', sprintf( $subject, $current_network->site_name, $user->user_login ) );

	wp_mail( $user->user_email, wp_specialchars_decode( $subject ), $message, $message_headers );

	if ( $switched_locale ) {
		restore_previous_locale();
	}

	return true;
}
```

## История изменений

- MU (3.0.0) — Introduced.

## Связанные

Использует: [`switch_to_user_locale`](https://chugunov.pro/api-wordpress/functions/switch_to_user_locale/), [`restore_previous_locale`](https://chugunov.pro/api-wordpress/functions/restore_previous_locale/), [`get_network`](https://chugunov.pro/api-wordpress/functions/get_network/), [`wp_parse_url`](https://chugunov.pro/api-wordpress/functions/wp_parse_url/), [`wp_specialchars_decode`](https://chugunov.pro/api-wordpress/functions/wp_specialchars_decode/), [`wp_mail`](https://chugunov.pro/api-wordpress/functions/wp_mail/), [`wp_login_url`](https://chugunov.pro/api-wordpress/functions/wp_login_url/), [`network_home_url`](https://chugunov.pro/api-wordpress/functions/network_home_url/), [`__`](https://chugunov.pro/api-wordpress/functions/__/), [`esc_html`](https://chugunov.pro/api-wordpress/functions/esc_html/), [`get_userdata`](https://chugunov.pro/api-wordpress/functions/get_userdata/), [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/), [`get_site_option`](https://chugunov.pro/api-wordpress/functions/get_site_option/), [`get_option`](https://chugunov.pro/api-wordpress/functions/get_option/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/wpmu_welcome_user_notification/
