Action hook 'wpmu_new_user'

in WP Core File wp-includes/ms-functions.php at line 1372

View Source

wpmu_new_user

Action Hook
Description
Fires immediately after a new user is created.

Hook Information

File Location wp-includes/ms-functions.php View on GitHub
Hook Type Action
Line Number 1372

Hook Parameters

Type Name Description
int $user_id User ID.

Usage Examples

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

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

Source Code Context

wp-includes/ms-functions.php:1372 - How this hook is used in WordPress core
<?php
1367  	 *
1368  	 * @since MU (3.0.0)
1369  	 *
1370  	 * @param int $user_id User ID.
1371  	 */
1372  	do_action( 'wpmu_new_user', $user_id );
1373  
1374  	return $user_id;
1375  }
1376  
1377  /**

PHP Documentation

<?php
/**
	 * Fires immediately after a new user is created.
	 *
	 * @since MU (3.0.0)
	 *
	 * @param int $user_id User ID.
	 */
Quick Info
  • Hook Type: Action
  • Parameters: 1
  • File: wp-includes/ms-functions.php
Related Hooks

Related hooks will be displayed here in future updates.