Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: network_user_new_created_user

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
49                 $add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
50           } else {
51                /**
52                  * Fires after a new user has been created via the network user-new.php page.
53                  *
54                  * @since 4.4.0
55                  *
56                  * @param int $user_id ID of the newly created user.
57                  */
58                do_action( 'network_user_new_created_user', $user_id );
59                wp_redirect( add_query_arg( array('update' => 'added', 'user_id' => $user_id ), 'user-new.php' ) );
60                exit;
61           }
62      }
63 }
64
65 if ( isset($_GET['update']) ) {
66      $messages = array();
67      if ( 'added' == $_GET['update'] ) {