Multisite: Add hook before a new user is created during the creation of a new site.
New `network_site_new_created_user_pending` action fires before a new user will be created via the network site-new.php page. Props mackensen Fixes #33631 Built from https://develop.svn.wordpress.org/trunk@35786 git-svn-id: http://core.svn.wordpress.org/trunk@35750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2b7183c94b
commit
66ea0d6e1b
|
@ -90,6 +90,15 @@ if ( isset($_REQUEST['action']) && 'add-site' == $_REQUEST['action'] ) {
|
||||||
$password = 'N/A';
|
$password = 'N/A';
|
||||||
$user_id = email_exists($email);
|
$user_id = email_exists($email);
|
||||||
if ( !$user_id ) { // Create a new user with a random password
|
if ( !$user_id ) { // Create a new user with a random password
|
||||||
|
/**
|
||||||
|
* Fires when a new user will be created via the network site-new.php page.
|
||||||
|
*
|
||||||
|
* @since 4.5.0
|
||||||
|
*
|
||||||
|
* @param string $email Email of the non-existent user.
|
||||||
|
*/
|
||||||
|
do_action( 'network_site_new_created_user_pending', $email );
|
||||||
|
|
||||||
$user_id = username_exists( $domain );
|
$user_id = username_exists( $domain );
|
||||||
if ( $user_id ) {
|
if ( $user_id ) {
|
||||||
wp_die( __( 'The domain or path entered conflicts with an existing username.' ) );
|
wp_die( __( 'The domain or path entered conflicts with an existing username.' ) );
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.5-alpha-35785';
|
$wp_version = '4.5-alpha-35786';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue