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: | r-a-y | Owned by: | boonebgorges |
|---|---|---|---|
| Priority: | normal | Milestone: | 2.1 |
| Component: | Members | Version: | 1.5.2 |
| Severity: | normal | 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Thumbs up from me. Removing SQL queries FTW :)