<!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']) &amp;&amp; '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']) &amp;&amp; '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&amp;#8217; uh?'));
</span><span class="lines">@@ -223,25 +223,25 @@
</span><span class="cx">         }
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;adduser&quot; id=&quot;adduser&quot; class=&quot;add:users: validate&quot;&lt;?php do_action('user_new_form_tag');?&gt;&gt;
</span><del>-&lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;adduser&quot; /&gt;
-&lt;?php wp_nonce_field('add-user') ?&gt;
</del><ins>+&lt;input name=&quot;action&quot; type=&quot;hidden&quot; value=&quot;adduser&quot; /&gt;
+&lt;?php wp_nonce_field( 'add-user', '_wpnonce_add-user' ) ?&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">         &lt;tr class=&quot;form-field form-required&quot;&gt;
</span><del>-                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;email&quot;&gt;&lt;?php echo $label; ?&gt;&lt;/label&gt;&lt;/th&gt;
-                &lt;td&gt;&lt;input name=&quot;email&quot; type=&quot;text&quot; id=&quot;email&quot; value=&quot;&quot; /&gt;&lt;/td&gt;
</del><ins>+                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;adduser-email&quot;&gt;&lt;?php echo $label; ?&gt;&lt;/label&gt;&lt;/th&gt;
+                &lt;td&gt;&lt;input name=&quot;email&quot; type=&quot;text&quot; id=&quot;adduser-email&quot; value=&quot;&quot; /&gt;&lt;/td&gt;
</ins><span class="cx">         &lt;/tr&gt;
</span><span class="cx">         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;role&quot;&gt;&lt;?php _e('Role'); ?&gt;&lt;/label&gt;&lt;/th&gt;
-                &lt;td&gt;&lt;select name=&quot;role&quot; id=&quot;role&quot;&gt;
</del><ins>+                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;adduser-role&quot;&gt;&lt;?php _e('Role'); ?&gt;&lt;/label&gt;&lt;/th&gt;
+                &lt;td&gt;&lt;select name=&quot;role&quot; id=&quot;adduser-role&quot;&gt;
</ins><span class="cx">                         &lt;?php wp_dropdown_roles( get_option('default_role') ); ?&gt;
</span><span class="cx">                         &lt;/select&gt;
</span><span class="cx">                 &lt;/td&gt;
</span><span class="cx">         &lt;/tr&gt;
</span><span class="cx"> &lt;?php if ( is_super_admin() ) { ?&gt;
</span><span class="cx">         &lt;tr&gt;
</span><del>-                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;noconfirmation&quot;&gt;&lt;?php _e('Skip Confirmation Email') ?&gt;&lt;/label&gt;&lt;/th&gt;
-                &lt;td&gt;&lt;label for=&quot;noconfirmation&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;noconfirmation&quot; id=&quot;noconfirmation&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Add the user without sending them a confirmation email.' ); ?&gt;&lt;/label&gt;&lt;/td&gt;
</del><ins>+                &lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;adduser-noconfirmation&quot;&gt;&lt;?php _e('Skip Confirmation Email') ?&gt;&lt;/label&gt;&lt;/th&gt;
+                &lt;td&gt;&lt;label for=&quot;adduser-noconfirmation&quot;&gt;&lt;input type=&quot;checkbox&quot; name=&quot;noconfirmation&quot; id=&quot;adduser-noconfirmation&quot; value=&quot;1&quot; /&gt; &lt;?php _e( 'Add the user without sending them a confirmation email.' ); ?&gt;&lt;/label&gt;&lt;/td&gt;
</ins><span class="cx">         &lt;/tr&gt;
</span><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx"> &lt;/table&gt;
</span><span class="lines">@@ -255,9 +255,9 @@
</span><span class="cx">                 echo '&lt;h3 id=&quot;create-new-user&quot;&gt;' . __( 'Create New User' ) . '&lt;/h3&gt;';
</span><span class="cx"> ?&gt;
</span><span class="cx"> &lt;p&gt;&lt;?php _e('Create a brand new user and add it to this site.'); ?&gt;&lt;/p&gt;
</span><del>-&lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;createuser&quot; id=&quot;adduser&quot; class=&quot;add:users: validate&quot;&lt;?php do_action('user_new_form_tag');?&gt;&gt;
-&lt;input name=&quot;action&quot; type=&quot;hidden&quot; id=&quot;action&quot; value=&quot;createuser&quot; /&gt;
-&lt;?php wp_nonce_field('create-user') ?&gt;
</del><ins>+&lt;form action=&quot;&quot; method=&quot;post&quot; name=&quot;createuser&quot; id=&quot;createuser&quot; class=&quot;add:users: validate&quot;&lt;?php do_action('user_new_form_tag');?&gt;&gt;
+&lt;input name=&quot;action&quot; type=&quot;hidden&quot; value=&quot;createuser&quot; /&gt;
+&lt;?php wp_nonce_field( 'create-user', '_wpnonce_create-user' ) ?&gt;
</ins><span class="cx"> &lt;?php
</span><span class="cx"> // Load up the passed data, else set to a default.
</span><span class="cx"> foreach ( array( 'user_login' =&gt; 'login', 'first_name' =&gt; 'firstname', 'last_name' =&gt; 'lastname',
</span></span></pre>
</div>
</div>

</body>
</html>