[wp-trac] [WordPress Trac] #58862: Add filter to allow to change who can add new users with their username on multisite

WordPress Trac noreply at wordpress.org
Thu Jul 20 10:23:43 UTC 2023


#58862: Add filter to allow to change who can add new users with their username on
multisite
-------------------------+------------------------------
 Reporter:  sippis       |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Users        |     Version:
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+------------------------------

Comment (by sippis):

 Oh, it looks like autocomplete can be allowed via
 `autocomplete_users_for_site_admins` filter. Autocomplete searches against
 the email address AND username, fills in the username, and when the form
 is submitted, validation nags about the invalid email address.

 1. Return true for `autocomplete_users_for_site_admins`
 2. Go to user-new.php
 3. Type a username that is not part of any email
 4. Select the result and submit form

 So this is actually a bug, since one does nothing with the autocomplete
 enabled without allowing usernames to be used.

 Should the `autocomplete_users_for_site_admins` filter also be used for
 the message and validation parts, or should a new filter still be
 introduced?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58862#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list