<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[16569] trunk/wp-admin/user-new.php: Fix duplicate HTML IDs for wp-admin/
user-new.php on MS installs.</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/16569">16569</a></dd>
<dt>Author</dt> <dd>markjaquith</dd>
<dt>Date</dt> <dd>2010-11-24 16:43:24 +0000 (Wed, 24 Nov 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>Fix duplicate HTML IDs for wp-admin/user-new.php on MS installs. props duck_. fixes <a href="http://trac.wordpress.org/ticket/15562">#15562</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminusernewphp">trunk/wp-admin/user-new.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminusernewphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/user-new.php (16568 => 16569)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/user-new.php        2010-11-24 16:30:40 UTC (rev 16568)
+++ trunk/wp-admin/user-new.php        2010-11-24 16:43:24 UTC (rev 16569)
</span><span class="lines">@@ -32,7 +32,7 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if ( isset($_REQUEST['action']) && 'adduser' == $_REQUEST['action'] ) {
</span><del>-        check_admin_referer('add-user');
</del><ins>+        check_admin_referer( 'add-user', '_wpnonce_add-user' );
</ins><span class="cx">
</span><span class="cx">         $user_details = null;
</span><span class="cx">         if ( false !== strpos($_REQUEST[ 'email' ], '@') ) {
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">         wp_redirect( $redirect );
</span><span class="cx">         die();
</span><span class="cx"> } elseif ( isset($_REQUEST['action']) && 'createuser' == $_REQUEST['action'] ) {
</span><del>-        check_admin_referer('create-user');
</del><ins>+        check_admin_referer( 'create-user', '_wpnonce_create-user' );
</ins><span class="cx">
</span><span class="cx">         if ( ! current_user_can('create_users') )
</span><span class="cx">                 wp_die(__('Cheatin&#8217; uh?'));
</span><span class="lines">@@ -223,25 +223,25 @@
</span><span class="cx">         }
</span><span class="cx"> ?>
</span><span class="cx"> <form action="" method="post" name="adduser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
</span><del>-<input name="action" type="hidden" id="action" value="adduser" />
-<?php wp_nonce_field('add-user') ?>
</del><ins>+<input name="action" type="hidden" value="adduser" />
+<?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?>
</ins><span class="cx">
</span><span class="cx"> <table class="form-table">
</span><span class="cx">         <tr class="form-field form-required">
</span><del>-                <th scope="row"><label for="email"><?php echo $label; ?></label></th>
-                <td><input name="email" type="text" id="email" value="" /></td>
</del><ins>+                <th scope="row"><label for="adduser-email"><?php echo $label; ?></label></th>
+                <td><input name="email" type="text" id="adduser-email" value="" /></td>
</ins><span class="cx">         </tr>
</span><span class="cx">         <tr class="form-field">
</span><del>-                <th scope="row"><label for="role"><?php _e('Role'); ?></label></th>
-                <td><select name="role" id="role">
</del><ins>+                <th scope="row"><label for="adduser-role"><?php _e('Role'); ?></label></th>
+                <td><select name="role" id="adduser-role">
</ins><span class="cx">                         <?php wp_dropdown_roles( get_option('default_role') ); ?>
</span><span class="cx">                         </select>
</span><span class="cx">                 </td>
</span><span class="cx">         </tr>
</span><span class="cx"> <?php if ( is_super_admin() ) { ?>
</span><span class="cx">         <tr>
</span><del>-                <th scope="row"><label for="noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
-                <td><label for="noconfirmation"><input type="checkbox" name="noconfirmation" id="noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
</del><ins>+                <th scope="row"><label for="adduser-noconfirmation"><?php _e('Skip Confirmation Email') ?></label></th>
+                <td><label for="adduser-noconfirmation"><input type="checkbox" name="noconfirmation" id="adduser-noconfirmation" value="1" /> <?php _e( 'Add the user without sending them a confirmation email.' ); ?></label></td>
</ins><span class="cx">         </tr>
</span><span class="cx"> <?php } ?>
</span><span class="cx"> </table>
</span><span class="lines">@@ -255,9 +255,9 @@
</span><span class="cx">                 echo '<h3 id="create-new-user">' . __( 'Create New User' ) . '</h3>';
</span><span class="cx"> ?>
</span><span class="cx"> <p><?php _e('Create a brand new user and add it to this site.'); ?></p>
</span><del>-<form action="" method="post" name="createuser" id="adduser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
-<input name="action" type="hidden" id="action" value="createuser" />
-<?php wp_nonce_field('create-user') ?>
</del><ins>+<form action="" method="post" name="createuser" id="createuser" class="add:users: validate"<?php do_action('user_new_form_tag');?>>
+<input name="action" type="hidden" value="createuser" />
+<?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?>
</ins><span class="cx"> <?php
</span><span class="cx"> // Load up the passed data, else set to a default.
</span><span class="cx"> foreach ( array( 'user_login' => 'login', 'first_name' => 'firstname', 'last_name' => 'lastname',
</span></span></pre>
</div>
</div>
</body>
</html>