[buddypress-trac] [BuddyPress Trac] #8378: Calls to `xprofile_get_field()` can result in unnecessary database queries
buddypress-trac
noreply at wordpress.org
Mon Oct 26 14:11:59 UTC 2020
#8378: Calls to `xprofile_get_field()` can result in unnecessary database queries
------------------------------+---------------------
Reporter: boonebgorges | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 7.0.0
Component: Extended Profile | Version:
Severity: normal | Resolution:
Keywords: has-patch |
------------------------------+---------------------
Comment (by boonebgorges):
In [changeset:"12768" 12768]:
{{{
#!CommitTicketReference repository="" revision="12768"
Declare `$get_data = false` when calling `xprofile_get_field()`.
The default value of `$get_data` is `true`, which means that when calling
`xprofile_get_field()` with no explicit `$user_id`, but with a logged-in
user,
`BP_XProfile_Field::populate()` will attempt to fetch the user's data.
This
is usually neither intended nor needed, and results in unnecessary
database
overhead.
See #8378.
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8378#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list