Definition:
function wpmu_welcome_user_notification($user_id, $password, $meta = '') {}
Notify a user that her account activation has been successful.
Filter ‘wpmu_welcome_user_notification’ to disable or bypass.
Parameters
- int $user_id
- string $password
- array $meta: Optional. Not used in the default function, but is passed along to hooks for customization.
Defined filters
- wpmu_welcome_user_notification
apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta)
- update_welcome_user_email
apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta)
Source code
function wpmu_welcome_user_notification($user_id, $password, $meta = '') { global $current_site; if ( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) ) return false; $welcome_email = get_site_option( 'welcome_user_email' ); $user = new WP_User($user_id); $welcome_email = apply_filters( 'update_welcome_user_email', $welcome_email, $user_id, $password, $meta); $welcome_email = str_replace( 'SITE_NAME', $current_site->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@' . $_SERVER['SERVER_NAME']; $from_name = get_site_option( 'site_name' ) == '' ? 'WordPress' : esc_html( get_site_option( 'site_name' ) ); $message_headers = "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
3409
No comments yet... Be the first to leave a reply!