Changeset 14184
- Timestamp:
- 12/29/2025 05:51:08 PM (7 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-core/classes/class-bp-loggedin-user.php
r14070 r14184 108 108 109 109 case 'fullname': 110 $current_user_id = get_current_user_id(); 110 $current_user_id = get_current_user_id(); 111 $disable_profile_sync = bp_disable_profile_sync(); 111 112 112 113 /** 113 * When profile sync is disabled, display_name may diverge from the xprofile114 * fullname field value, and the xprofile field should take precedence.115 */114 * When profile sync is disabled, display_name may diverge from the xprofile 115 * fullname field value, and the xprofile field should take precedence. 116 */ 116 117 $retval = ''; 117 if ( bp_disable_profile_sync() ) {118 if ( $disable_profile_sync && bp_is_active( 'xprofile' ) ) { 118 119 $retval = xprofile_get_field_data( bp_xprofile_fullname_field_name(), $current_user_id ); 119 120 } … … 122 123 * Common case: If BP profile and WP profiles are synced, 123 124 * then we use the WP value. 124 * This is also used if the xprofile field data is preferred, but empty .125 * This is also used if the xprofile field data is preferred, but empty or the component is disabled. 125 126 */ 126 if ( ! bp_disable_profile_sync()|| ! $retval ) {127 if ( ! $disable_profile_sync || ! $retval ) { 127 128 $retval = bp_core_get_user_displayname( $current_user_id ); 128 129 } … … 139 140 default: 140 141 return isset( $this->{$key} ) ? $this->{$key} : null; 141 }142 } 142 143 } 143 144
Note: See TracChangeset
for help on using the changeset viewer.