WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 2 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)

18160.patch (7.9 KB) - added by boonebgorges 3 years ago.
18160.2.patch (9.7 KB) - added by boonebgorges 3 years ago.

Download all attachments as: .zip

Change History (15)

comment:2 jane3 years ago

Want.

comment:3 PeteMall3 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Owner set to PeteMall
  • Status changed from new to accepted

comment:4 jane3 years ago

  • Keywords needs-patch added
  • Milestone changed from Future Release to 3.3
  • Version set to 3.2

comment:5 nacin3 years ago

  • Milestone changed from 3.3 to Future Release

Needs a patch. :(

comment:7 boonebgorges3 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.

comment:8 nacin3 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!

comment:9 boonebgorges3 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.

boonebgorges3 years ago

boonebgorges3 years ago

comment:10 boonebgorges3 years ago

Oops - forgot to svn add the new js file first time around. See 18160.2.patch.

comment:11 DrewAPicture3 years ago

  • Cc xoodrew@… added

Related: #19810

comment:12 japh3 years ago

  • Cc japh@… added

comment:13 ryan2 years ago

  • Keywords 3.4-early removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from accepted to closed

Duping against #19810

Note: See TracTickets for help on using tickets.