Make WordPress Core

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's profile danielbachhuber Owned by: petemall's profile 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 13 years ago.
18160.2.patch (9.7 KB) - added by boonebgorges 13 years ago.

Download all attachments as: .zip

Change History (15)

#2 @jane
13 years ago

Want.

#3 @PeteMall
13 years ago

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

#4 @jane
13 years ago

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

#5 @nacin
13 years ago

  • Milestone changed from 3.3 to Future Release

Needs a patch. :(

#7 @boonebgorges
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 @nacin
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 @boonebgorges
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.

@boonebgorges
13 years ago

#10 @boonebgorges
13 years ago

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

#11 @DrewAPicture
13 years ago

  • Cc xoodrew@… added

Related: #19810

#12 @japh
13 years ago

  • Cc japh@… added

#13 @ryan
12 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.