Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#11380 closed defect (bug) (fixed)

default_password_nag_handler() creates queries all over the place

Reported by: Denis-de-Bernardy Owned by:
Priority: normal Milestone: 3.0
Component: Optimization Version:
Severity: normal Keywords: has-patch
Cc:

Description

Once the default password nag has been acted upon, it deletes the related user meta.

On every page load thereafter, WP will go into the DB in order to check for the user meta's value. We should store some kind of new meta, or maybe a cookie, so we know it has been acted upon.

Attachments (1)

11380.diff (1.5 KB) - added by Denis-de-Bernardy 3 years ago.

Download all attachments as: .zip

Change History (5)

  • Component changed from Performance to Optimization
  • Keywords has-patch added

Related: #9065

comment:3   dd323 years ago

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

(In [12983]) Switch to *_user_option() for default password nag to avoid extra DB queries. Fixes #11380

comment:4   dd323 years ago

As of WordPress 3.0, get_user_option() only checks the user object (which is filled with the usermeta on creation). Using that instead means using a higher level API as well as avoiding the extra queries which were seen.

Note: See TracTickets for help on using tickets.