WordPress.org

Make WordPress Core

Opened 14 years ago

Closed 14 years ago

#2096 closed defect (bug) (fixed)

wp_cache user cache uses user_login AND user_id as keys

Reported by: donncha Owned by: rboren
Milestone: Priority: highest omg bbq
Severity: critical Version: 2.0
Component: General Keywords: bg|has-patch
Focuses: Cc:

Description

The wp_cache user group uses both user_login and user_id as keys. This has the side-effect that existing numeric logins get confused between their username and the data of a user with the same user_id.

Fix: add a "userlogins" group and change all references to the "users" cache group using user_login as a key so they use the "userlogins" group.

Possibly affected files: wp-admin/admin-db.php wp-includes/cache.php wp-includes/capabilities.php wp-includes/functions.php wp-includes/pluggable-functions.php wp-includes/registration-functions.php
I'll try to dig up a patch for this shortly.

Attachments (1)

users.diff (3.0 KB) - added by donncha 14 years ago.

Download all attachments as: .zip

Change History (3)

@donncha
14 years ago

#1 @davidhouse
14 years ago

  • Keywords bg|has-patch added

#2 @ryan
14 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [3330]) Cache user ids and user logins separately to avoid collision. Props donncha. fixes #2096

Note: See TracTickets for help on using tickets.