Skip to:
Content

BuddyPress.org

Changeset 1457


Ignore:
Timestamp:
04/30/2009 01:30:03 PM (17 years ago)
Author:
apeatling
Message:

Fixes #713

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-templatetags.php

    r1456 r1457  
    243243            if ( empty($fullname) || !$fullname ) {
    244244                $ud = get_userdata($user_id);
    245                 $fullname = bp_core_ucfirst($ud->user_login);
     245                $fullname = $ud->display_name;
    246246
    247247                xprofile_set_field_data( BP_XPROFILE_FULLNAME_FIELD_NAME, $user_id, $fullname );
     
    249249        } else {
    250250            $ud = get_userdata($user_id);
    251             $fullname = $ud->user_login;
     251            $fullname = $ud->display_name;
    252252        }
    253253
     
    304304
    305305function bp_core_get_wp_profile() {
    306     global $current_user;
     306    global $bp;
     307   
     308    $ud = get_userdata( $bp->displayed_user->id );
    307309?>
    308310
     
    311313
    312314    <table class="wp-profile-fields">
    313         <?php if ( $current_user->first_name || $current_user->last_name ) { ?>
    314         <tr>
     315        <?php if ( $ud->display_name ) { ?>
     316        <tr id="wp_displayname">
    315317            <td class="label">
    316                 <?php _e( 'Full Name', 'buddypress' ) ?>
     318                <?php _e( 'Name', 'buddypress' ) ?>
    317319            </td>
    318320            <td class="data">
    319                 <?php echo $current_user->first_name . ' ' . $current_user->last_name ?>
     321                <?php echo $ud->display_name ?>
    320322            </td>
    321323        </tr>
    322324        <?php } ?>
    323         <?php if ( $current_user->user_description ) { ?>
    324         <tr>
     325        <?php if ( $ud->user_description ) { ?>
     326        <tr id="wp_desc">
    325327            <td class="label">
    326328                <?php _e( 'About Me', 'buddypress' ) ?>
    327329            </td>
    328330            <td class="data">
    329                 <?php echo $current_user->user_description ?>
     331                <?php echo $ud->user_description ?>
    330332            </td>
    331333        </tr>
    332334        <?php } ?>
    333         <?php if ( $current_user->jabber ) { ?>
    334         <tr>
     335        <?php if ( $ud->user_url ) { ?>
     336        <tr id="wp_website">
     337            <td class="label">
     338                <?php _e( 'Website', 'buddypress' ) ?>
     339            </td>
     340            <td class="data">
     341                <?php echo make_clickable( $ud->user_url ) ?>
     342            </td>
     343        </tr>
     344        <?php } ?>
     345        <?php if ( $ud->jabber ) { ?>
     346        <tr id="wp_jabber">
    335347            <td class="label">
    336348                <?php _e( 'Jabber', 'buddypress' ) ?>
    337349            </td>
    338350            <td class="data">
    339                 <?php echo $current_user->jabber ?>
     351                <?php echo $ud->jabber ?>
    340352            </td>
    341353        </tr>
    342354        <?php } ?>
    343         <?php if ( $current_user->aim ) { ?>
    344         <tr>
     355        <?php if ( $ud->aim ) { ?>
     356        <tr id="wp_aim">
    345357            <td class="label">
    346358                <?php _e( 'AOL Messenger', 'buddypress' ) ?>
    347359            </td>
    348360            <td class="data">
    349                 <?php echo $current_user->aim ?>
     361                <?php echo $ud->aim ?>
    350362            </td>
    351363        </tr>
    352364        <?php } ?>
    353         <?php if ( $current_user->yim ) { ?>
    354         <tr>
     365        <?php if ( $ud->yim ) { ?>
     366        <tr id="wp_yim">
    355367            <td class="label">
    356368                <?php _e( 'Yahoo Messenger', 'buddypress' ) ?>
    357369            </td>
    358370            <td class="data">
    359                 <?php echo $current_user->yim ?>
     371                <?php echo $ud->yim ?>
    360372            </td>
    361373        </tr>
Note: See TracChangeset for help on using the changeset viewer.