#5764 closed defect (bug) (fixed)
Incorrect way of setting the displayed user "fullname" in bp-members-loader.php
Reported by: | imath | Owned by: | djpaul |
---|---|---|---|
Milestone: | 2.1 | Priority: | high |
Severity: | normal | Version: | |
Component: | Members | Keywords: | |
Cc: |
Description
In r8610, commit message is saying :
In bp-members, use only WP core data to set up the loggedin_user and displayed_user global objects. Previously, these objects were configured by referenced to xprofile, which required that xprofile be loaded before members. Now, users' display names are first loaded from wp_users, and are overridden by the xprofile
The problem is, since this commit, the $bp->displayed_user->fullname
is never set causing various troubles in single member <title>
html tag, in the post_title
of the single member, in the title of the friends widget.. Actually, anywhere the bp_get_displayed_user_fullname()
function is used.
It's never set because the "fullname" attribute is not a wp_users field and bp_core_get_core_userdata()
is only getting wp_users fields. Using WP Core get_userdata() wouldn't get the "fullname" neither as it's not one of the user_meta returned by WordPress.
I suggest to use the display_name attribute instead to avoid these troubles.
Attachments (1)
Change History (5)
#2
@
11 years ago
- Keywords has-patch 2nd-opinion removed
- Resolution fixed deleted
- Status changed from closed to reopened
This has caused the tests to fail when running against WordPress core trunk (on travis; it seems to work OK when tested locally).
https://travis-ci.org/buddypress/BuddyPress/builds/30577776
#3
@
11 years ago
- Resolution set to fixed
- Status changed from reopened to closed
The timing here was coincidentaly. It's not r8660 that was causing the failures, it was an upstream change (https://core.trac.wordpress.org/changeset/29267) that was causing the loggedin_user not to be reinitiated between tests. The upstream change has been reverted (https://core.trac.wordpress.org/changeset/29274). See https://core.trac.wordpress.org/ticket/28986 for more discussion.
Our builds are now passing: https://travis-ci.org/buddypress/BuddyPress/builds
In 8660: