[wp-trac] [WordPress Trac] #15115: if filter show_password_field is set to false, you cannot add new users

WordPress Trac wp-trac at lists.automattic.com
Thu Jan 13 15:31:23 UTC 2011


#15115: if filter show_password_field is set to false, you cannot add new users
----------------------------+------------------------------
 Reporter:  pampfelimetten  |       Owner:
     Type:  defect (bug)    |      Status:  new
 Priority:  normal          |   Milestone:  Awaiting Review
Component:  Users           |     Version:  3.0.1
 Severity:  minor           |  Resolution:
 Keywords:  has-patch       |
----------------------------+------------------------------
Changes (by coffee2code):

 * keywords:   => has-patch
 * severity:  major => minor


Comment:

 This is true.  As the OP states, disabling display of password fields via

 {{{
 add_filter( 'show_password_fields', '__return_false' );
 }}}

 causes the password fields not to be shown on the user creation admin form
 (`http://example.com/wp-admin/user-new.php`).

 My understanding of the filter's purpose is to make it possible to prevent
 users from using the profile form to change their password.  This
 situation is indeed covered by the application of this filter in `wp-admin
 /user-edit.php`.  The application of this filter in `wp-admin/user-
 new.php` does not seem appropriate (no sense in creating a user if you
 can't supply their password).

 Attached is a patch, `15115.diff`, which removes the filter from the user
 creation form.

 Relatedly (though separate ticket at best): should those with
 `create_users` capability not have this filter applied to them at all?
 That way admins would always be able to edit user passwords.  (Of course,
 this could be implemented via a plugin or the code adding the filter in
 the first place.)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15115#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list