X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/0461a5f2e55c8d5f1fde96ca2e83117152573c7d..9e77185fafaf4e60e2b73821e0e4b9b1a11fb85f:/wp-admin/user-new.php diff --git a/wp-admin/user-new.php b/wp-admin/user-new.php index b5c9c0bc..19356ef9 100644 --- a/wp-admin/user-new.php +++ b/wp-admin/user-new.php @@ -171,11 +171,11 @@ get_current_screen()->add_help_tab( array( 'title' => __('User Roles'), 'content' => '

' . __('Here is a basic overview of the different user roles and the permissions associated with each one:') . '

' . '' ) ); @@ -272,11 +272,13 @@ if ( is_multisite() ) { if ( $do_both ) echo '

' . __('Add Existing User') . '

'; if ( !is_super_admin() ) { - _e( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); + echo '

' . __( 'Enter the email address of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '

'; $label = __('E-mail'); + $type = 'email'; } else { - _e( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ); + echo '

' . __( 'Enter the email address or username of an existing user on this network to invite them to this site. That person will be sent an email asking them to confirm the invite.' ) . '

'; $label = __('E-mail or Username'); + $type = 'text'; } ?> -
> +> - + @@ -305,7 +307,7 @@ if ( is_multisite() ) { - +
@@ -334,21 +336,21 @@ if ( current_user_can( 'create_users') ) { ?>

-> +> 'login', 'first_name' => 'firstname', 'last_name' => 'lastname', - 'email' => 'email', 'url' => 'uri', 'role' => 'role', 'send_password' => 'send_password', 'noconfirmation' => 'ignore_pass' ) as $post_field => $var ) { - $var = "new_user_$var"; - if( isset( $_POST['createuser'] ) ) { - if ( ! isset($$var) ) - $$var = isset( $_POST[$post_field] ) ? wp_unslash( $_POST[$post_field] ) : ''; - } else { - $$var = false; - } -} +$creating = isset( $_POST['createuser'] ); + +$new_user_login = $creating && isset( $_POST['user_login'] ) ? wp_unslash( $_POST['user_login'] ) : ''; +$new_user_firstname = $creating && isset( $_POST['first_name'] ) ? wp_unslash( $_POST['first_name'] ) : ''; +$new_user_lastname = $creating && isset( $_POST['last_name'] ) ? wp_unslash( $_POST['last_name'] ) : ''; +$new_user_email = $creating && isset( $_POST['email'] ) ? wp_unslash( $_POST['email'] ) : ''; +$new_user_uri = $creating && isset( $_POST['url'] ) ? wp_unslash( $_POST['url'] ) : ''; +$new_user_role = $creating && isset( $_POST['role'] ) ? wp_unslash( $_POST['role'] ) : ''; +$new_user_send_password = $creating && isset( $_POST['send_password'] ) ? wp_unslash( $_POST['send_password'] ) : ''; +$new_user_ignore_pass = $creating && isset( $_POST['noconfirmation'] ) ? wp_unslash( $_POST['noconfirmation'] ) : ''; ?> @@ -358,7 +360,7 @@ foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_nam - + @@ -371,7 +373,7 @@ foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_nam - + - +