Opened 12 years ago
Closed 12 years ago
#5696 closed enhancement (fixed)
Use get_user_by() for bp_core_get_userid_from_nicename()
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 2.1 | Priority: | normal |
| Severity: | normal | Version: | 1.5.2 |
| Component: | Members | Keywords: | has-patch commit |
| Cc: |
Description
bp_core_get_userid_from_nicename() (or bp_core_get_userid()) is run on every member profile page and is currently uncached.
Attached patch:
- switches the direct DB query with
get_user_by(), which caches the query when an object cache is enabled - returns
NULLso it emulates the previous DB query on failure
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
Thumbs up from me. Removing SQL queries FTW :)