[wp-trac] [WordPress Trac] #43393: get_user_by can return wrong user info

WordPress Trac noreply at wordpress.org
Fri Feb 23 14:38:15 UTC 2018


#43393: get_user_by can return wrong user info
--------------------------+-----------------------------
 Reporter:  hberberoglu   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:  4.9.4
 Severity:  normal        |   Keywords:
  Focuses:  performance   |
--------------------------+-----------------------------
 I am using memcached object cache dropin (I use
 https://tr.wordpress.org/plugins/memcached/) and there is two user record
 on wp_users table; one user's user_login is 'AlbertEinstein' other one's
 is 'Albert Einstein'. So there is two different user.

 But these codes below are returning always same user's info;
 AlbertEinstein's info.

 {{{
 $user_data = get_user_by('login', 'Albert Einstein');
 }}}


 {{{
 $user_data = get_user_by('login', 'AlbertEinstein');
 }}}

 It happens because of memcached protocol;

 For installs that use the memcache/memcached object-cache drop-in (and
 possibly others), the resulting wp_cache_get always returns false since a
 memcached key "... must not include control characters or whitespace."
 (per
 [https://github.com/memcached/memcached/blob/master/doc/protocol.txt])

 (this copied from #39034)

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43393>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list