new_user_email_admin_notice() WordPress Function

The new_user_email_admin_notice() function is used to send an email to the administrator when a new user registers on the site. This can be useful for keeping track of new users and keeping your site secure.

new_user_email_admin_notice() #

Adds an admin notice alerting the user to check for confirmation request email after email address change.


Source

File: wp-includes/user.php

function new_user_email_admin_notice() {
	global $pagenow;

	if ( 'profile.php' === $pagenow && isset( $_GET['updated'] ) ) {
		$email = get_user_meta( get_current_user_id(), '_new_email', true );
		if ( $email ) {
			/* translators: %s: New email address. */
			echo '<div class="notice notice-info"><p>' . sprintf( __( 'Your email address has not been updated yet. Please check your inbox at %s for a confirmation email.' ), '<code>' . esc_html( $email['newemail'] ) . '</code>' ) . '</p></div>';
		}
	}
}


Top ↑

Changelog

Changelog
VersionDescription
4.9.0This function was moved from wp-admin/includes/ms.php so it's no longer Multisite specific.
3.0.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More