[buddypress-trac] [BuddyPress Trac] #5696: Use get_user_by() for bp_core_get_userid_from_nicename()
buddypress-trac
noreply at wordpress.org
Mon Jun 9 00:10:01 UTC 2014
#5696: Use get_user_by() for bp_core_get_userid_from_nicename()
-------------------------+-----------------------
Reporter: r-a-y | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 2.1
Component: Members | Version: 1.5.2
Severity: normal | Keywords: has-patch
-------------------------+-----------------------
`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 `NULL` so it emulates the previous DB query on failure
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5696>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list