Opened 13 years ago
Closed 12 years ago
#18160 closed feature request (duplicate)
Auto-suggest usernames on views for adding user to site
Reported by: | danielbachhuber | Owned by: | PeteMall |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.2 |
Component: | Multisite | Keywords: | needs-patch |
Focuses: | Cc: |
Description
In a multisite network, it's often difficult to try and remember usernames, or a pain to search the users table, and then copy and paste the username you've found into the window with the form. Furthermore, site admins have no access to a global table of users to search and add from.
If we can solve the scaling issues, it would be much better to be able to auto-suggest usernames when a site admin or super admin is adding a user to a site.
Relevant views:
- /wp-admin/user-new.php
- /wp-admin/network/site-users.php
Attachments (2)
Change History (15)
#3
@
13 years ago
- Milestone changed from Awaiting Review to Future Release
- Owner set to PeteMall
- Status changed from new to accepted
#4
@
13 years ago
- Keywords needs-patch added
- Milestone changed from Future Release to 3.3
- Version set to 3.2
#7
@
13 years ago
I just released a plugin to do this: http://teleogistic.net/2011/11/new-wordpress-plugin-add-user-autocomplete/
It'll need some reworking to work as a core patch. I needed it to work with 3.2.x so I didn't use the jQueryUI autocomplete that comes with 3.3. I'll try to work on it in the upcoming days, but in case I forget, anyone else is welcome to pick it apart.
#8
@
13 years ago
- Keywords 3.4-early added
We use suggest.js in core and have had no stated desire to move to autocomplete, but if autocomplete offers more benefits for this use case, that's fine. Thanks boone!
#9
@
13 years ago
OK, here's a first go at it. I've applied some minimal styling (including a spinner) - someone with a better eye will probably want take the CSS for a spin, to make it better match the rest of the admin.
Re: scaling - I do two WP_User_Querys: one to get users of the current blog, so that they can be excluded from the main query. That obviously affects efficiency. That extra query could pretty easily be cut out, without (I think) much loss in functionality. A good future enhancement for WP_User_Query would be to add blog_idin and blog_idnot_in params, which could be put to good use here.
Hope this is a helpful start.
Related: #18161 #18162 #17948 #18163