Site admins on a WordPress Network can add existing network members to their site on the Dashboard > Users > Add New panel. But the interface requires that one know either the email address or the username of the user in question. My new plugin, Add User Autocomplete, makes the Add Existing User workflow a bit easier, by adding autocomplete/autosuggest to the Email Address/Username field. Just start typing, and the plugin will return matching users; arrow down or click on the intended user to add her to the Add User list.
A few additional bonuses provided by the plugin, aside from autocomplete:
- In addition to return email address and username matches, the plugin also checks against the display_name and user_url fields. So if my username is ‘admin’, and my email address is ‘email@example.com’, but my display name around the site is ‘Boone Gorges’, you’ll be able to find me by searching on ‘Boone’.
- You can add many users to a blog at once. Search for one user, select and hit Return, and then search for another.
- Prettier success messages. When you submit the Add New User page, your success message will give you a list of the users invited, instead of a generic “Invitations have been sent” type message.
Think you could boil this down to a patch for http://core.trac.wordpress.org/ticket/18160? If not, I will look to merge it in myself in 3.4.
Yeah, I’ll work on it. I’ll have to rewrite it to use 3.3’s packaged jQueryUI autocomplete. I’ll probably submit another enhancement that allows for WP_User_Query’s search_terms to query display_name as well, though it’s not really crucial for this plugin to work. Thanks for the prod.
display_name isn’t indexed, which is why WP_User_Query doesn’t support it for searching. It’s a deliberate omission.
Unfortunately a core feature will need to rely on usernames and emails.
That said, we do have a way of identifying large networks (> 10,000 sites, or > 10,000 users, depending on what why we want to know). Perhaps display_name can be added for “small” networks, assuming the filesort can be shown to not be particularly terrible at that scale.
awesome. you rock. I could never figure out why this feature wasn’t built into wordpress from day one… having to know the email address someone used to create their account, in order to add them to a site?