Action hook 'edit_user_created_user'

in WP Core File wp-admin/includes/user.php at line 247

View Source

edit_user_created_user

Action Hook
Description
Fires after a new user has been created.

Hook Information

File Location wp-admin/includes/user.php View on GitHub
Hook Type Action
Line Number 247

Hook Parameters

Type Name Description
int|WP_Error $user_id ID of the newly created user or WP_Error on failure.
string $notify Type of notification that should happen. See wp_send_new_user_notifications() for more information.

Usage Examples

Basic Usage
<?php
// Hook into edit_user_created_user
add_action('edit_user_created_user', 'my_custom_function', 10, 2);

function my_custom_function($user_id, $notify) {
    // Your custom code here
}

Source Code Context

wp-admin/includes/user.php:247 - How this hook is used in WordPress core
<?php
 242  		 *
 243  		 * @param int|WP_Error $user_id ID of the newly created user or WP_Error on failure.
 244  		 * @param string       $notify  Type of notification that should happen. See
 245  		 *                              wp_send_new_user_notifications() for more information.
 246  		 */
 247  		do_action( 'edit_user_created_user', $user_id, $notify );
 248  	}
 249  	return $user_id;
 250  }
 251  
 252  /**

PHP Documentation

<?php
/**
		 * Fires after a new user has been created.
		 *
		 * @since 4.4.0
		 *
		 * @param int|WP_Error $user_id ID of the newly created user or WP_Error on failure.
		 * @param string       $notify  Type of notification that should happen. See
		 *                              wp_send_new_user_notifications() for more information.
		 */
Quick Info
  • Hook Type: Action
  • Parameters: 2
  • File: wp-admin/includes/user.php
Related Hooks

Related hooks will be displayed here in future updates.