Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#35750 closed defect (bug) (fixed)

Updating a user should invalidate userslugs cache

Reported by: thebrandonallen Owned by: boonebgorges
Priority: normal Milestone: 4.5
Component: Users Version: 3.0
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

There are four user cache groups. However, between wp_insert_user and wp_update_user, only three of the groups are invalidated. The userslugs cache is never invalidated. Since a nicename can be updated via wp_update_user we should be invalidating the userslugs cache as well.

Attachments (1)

invalidate_userslugs_cache.patch (1.2 KB ) - added by thebrandonallen 11 years ago.

Download all attachments as: .zip

Change History (5)

#1 @thebrandonallen
11 years ago

  • Keywords has-patch has-unit-tests added

#2 @boonebgorges
11 years ago

  • Milestone Awaiting Review4.5

Good catch.

#3 @boonebgorges
11 years ago

  • Owner set to boonebgorges
  • Resolutionfixed
  • Status newclosed

In 36482:

When updating a user, invalidate its 'userslugs' cache.

user_nicename can be changed via wp_update_user(), so we invalidate just
to be safe.

Props thebrandonallen.
Fixes #35750.

#4 @johnbillion
11 years ago

  • Version trunk3.0
Note: See TracTickets for help on using tickets.