Make WordPress Core

Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#5392 closed defect (bug) (fixed)

get_user_by_email() and get_user* cleanup

Reported by: ryan's profile ryan Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: user cache
Focuses: Cc:


Add a get_user_by_email() function to get a user by email address. It should use an email to user id cache to avoid DB trips. If an email address does not match a user, cache that fact. If this results in too much stuff in the cache, we can lose this part.

While we're at it. Clean up the get_user* functions. Refactor the back compat and caching code into a new private function shared by all of the get functions.

Attachments (1)

get_user.2.diff (5.8 KB) - added by ryan 16 years ago.

Download all attachments as: .zip

Change History (5)

16 years ago

#1 @Bobcat
16 years ago

How does this relate to the changes you requested in #4642 ? Patches there have functions get_userdatabyemail() or get_user_by(), which you requested.

#2 @ryan
16 years ago

This provides the same thing. I decided to go with get_user_by_email() instead of a generic get_user_by(). This patch also does some cleanup and cache work that I've been meaning to do.

#3 @ryan
16 years ago

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

(In [6346]) get_user_by_email() and some user caching cleanups. fixes #5392

#4 @Bobcat
16 years ago

So are you going to modify #4642 to work with your changes?

Note: See TracTickets for help on using tickets.