if ( ! $user_id ) {
$add_user_errors = new WP_Error( 'add_user_fail', __( 'Cannot add user.' ) );
} else {
- wp_new_user_notification( $user_id, 'both' );
+ /**
+ * Fires after a new user has been created via the network user-new.php page.
+ *
+ * @since 4.4.0
+ *
+ * @param int $user_id ID of the newly created user.
+ */
+ do_action( 'network_user_new_created_user', $user_id );
wp_redirect( add_query_arg( array('update' => 'added'), 'user-new.php' ) );
exit;
}
<table class="form-table">
<tr class="form-field form-required">
<th scope="row"><label for="username"><?php _e( 'Username' ) ?></label></th>
- <td><input type="text" class="regular-text" name="user[username]" id="username" autocapitalize="none" autocorrect="off" /></td>
+ <td><input type="text" class="regular-text" name="user[username]" id="username" autocapitalize="none" autocorrect="off" maxlength="60" /></td>
</tr>
<tr class="form-field form-required">
<th scope="row"><label for="email"><?php _e( 'Email' ) ?></label></th>