wp_pre_insert_user_data

wp_pre_insert_user_data

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: wordpress-6.7

apply_filters('wp_pre_insert_user_data') is found 1 times:

  • /wp-includes/user.php line 2410
    	 * @param bool     $update   Whether the user is being updated rather than created.
    	 * @param int|null $user_id  ID of the user to be updated, or NULL if the user is being created.
    	 * @param array    $userdata The raw array of data passed to wp_insert_user().
    	 */
    	$data = apply_filters( 'wp_pre_insert_user_data', $data, $update, ( $update ? $user_id : null ), $userdata );
    
    	if ( empty( $data ) || ! is_array( $data ) ) {
    		return new WP_Error( 'empty_data', __( 'Not enough data to create this user.' ) );
    	}
    
    	if ( $update ) {
    

See this hook used in plugins: