[buddypress-trac] [BuddyPress Trac] #7601: Add user_id to $results array for easier filtering of autocompletes

buddypress-trac noreply at wordpress.org
Wed Sep 27 08:25:50 UTC 2017


#7601: Add user_id to $results array for easier filtering of autocompletes
-----------------------------+----------------------------------
 Reporter:  bradmkjr         |       Owner:
     Type:  feature request  |      Status:  new
 Priority:  normal           |   Milestone:  Under Consideration
Component:  Members          |     Version:
 Severity:  normal           |  Resolution:
 Keywords:  dev-feedback     |
-----------------------------+----------------------------------
Changes (by DJPaul):

 * keywords:   => dev-feedback
 * component:  Core => Members
 * milestone:   => Under Consideration


Comment:

 On one hand, sure, I'm OK to add this. I looked into core's `get_user_by(
 'slug', ... )` and it does have a cache for look-ups by `user_nicename`,
 but I can understand the developer convenience of having the ID, given
 that most functions take user IDs.

 On the other hand, this data is passed to `bp_ajax_get_suggestions()`,
 which is sent on page requests when authenticated and Friends is enabled
 and the user has friends. We'd be exposing user IDs, which I'm not *sure*
 we do anywhere else (or if we should stop doing that, I know we've had
 similar "complaints" about the `user_nicename` in the URL before).

 Moving to a second opinion.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7601#comment:1>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list