Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/05/2011 03:19:56 PM (13 years ago)
Author:
boonebgorges
Message:

Corrects property names in bp_friends_random_members(). Fixes #3317. Props dgwatkins. Also clears some PHP warnings in the xprofile get_random() method

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-template.php

    r4335 r4612  
    116116}
    117117
     118/**
     119 * Pull up a group of random members, and display some profile data about them
     120 *
     121 * This function is no longer used by BuddyPress core.
     122 *
     123 * @package BuddyPress
     124 *
     125 * @param int $total_members The number of members to retrieve
     126 */
    118127function bp_friends_random_members( $total_members = 5 ) {
    119128    global $bp;
     
    122131        $user_ids = BP_Core_User::get_users( 'random', $total_members );
    123132        wp_cache_set( 'friends_random_users', $user_ids, 'bp' );
    124     } ?>
     133    }
     134   
     135    ?>
    125136
    126137    <?php if ( $user_ids['users'] ) { ?>
     
    131142
    132143            <li>
    133                 <a href="<?php echo bp_core_get_user_domain( $user_ids['users'][$i]->user_id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->user_id, 'type' => 'thumb' ) ) ?></a>
    134                 <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->user_id ) ?></h5>
     144                <a href="<?php echo bp_core_get_user_domain( $user_ids['users'][$i]->id ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $user_ids['users'][$i]->id, 'type' => 'thumb' ) ) ?></a>
     145                <h5><?php echo bp_core_get_userlink( $user_ids['users'][$i]->id ) ?></h5>
    135146
    136147                <?php if ( bp_is_active( 'xprofile' ) ) { ?>
    137148
    138                     <?php $random_data = xprofile_get_random_profile_data( $user_ids['users'][$i]->user_id, true ); ?>
     149                    <?php $random_data = xprofile_get_random_profile_data( $user_ids['users'][$i]->id, true ); ?>
    139150
    140151                    <div class="profile-data">
     
    151162                    <?php if ( bp_is_active( 'friends' ) ) { ?>
    152163
    153                         <?php bp_add_friend_button( $user_ids['users'][$i]->user_id ) ?>
     164                        <?php bp_add_friend_button( $user_ids['users'][$i]->id ) ?>
    154165
    155166                    <?php } ?>
Note: See TracChangeset for help on using the changeset viewer.