pre_network_site_new_created_user
Action HookDescription
Fires immediately before a new user is created via the network site-new.php page.Hook Information
File Location |
wp-admin/network/site-new.php
View on GitHub
|
Hook Type | Action |
Line Number | 121 |
Hook Parameters
Type | Name | Description |
---|---|---|
string
|
$email
|
Email of the non-existent user. |
Usage Examples
Basic Usage
<?php
// Hook into pre_network_site_new_created_user
add_action('pre_network_site_new_created_user', 'my_custom_function', 10, 1);
function my_custom_function($email) {
// Your custom code here
}
Source Code Context
wp-admin/network/site-new.php:121
- How this hook is used in WordPress core
<?php
116 *
117 * @since 4.5.0
118 *
119 * @param string $email Email of the non-existent user.
120 */
121 do_action( 'pre_network_site_new_created_user', $email );
122
123 $user_id = username_exists( $domain );
124 if ( $user_id ) {
125 wp_die( __( 'The domain or path entered conflicts with an existing username.' ) );
126 }
PHP Documentation
<?php
/**
* Fires immediately before a new user is created via the network site-new.php page.
*
* @since 4.5.0
*
* @param string $email Email of the non-existent user.
*/
Quick Info
- Hook Type: Action
- Parameters: 1
- File: wp-admin/network/site-new.php
Related Hooks
Related hooks will be displayed here in future updates.