Ticket #508: bp-core-nicola-patch.diff
File bp-core-nicola-patch.diff, 4.3 KB (added by , 16 years ago) |
---|
-
bp-core.php
345 345 346 346 if ( !$user_id ) return; 347 347 348 $ud = get_user data($user_id);348 $ud = get_usermeta($user_id); 349 349 350 350 return $bp->root_domain . '/' . MEMBERS_SLUG . '/' . $ud->user_login . '/'; 351 351 } … … 570 570 if ( $bp->current_component == MEMBERS_SLUG && isset( $_GET['random'] ) ) { 571 571 $user = BP_Core_User::get_random_users(1); 572 572 573 $ud = get_user data( $user['users'][0]->user_id );573 $ud = get_usermeta( $user['users'][0]->user_id ); 574 574 bp_core_redirect( $bp->root_domain . '/' . MEMBERS_SLUG . '/' . $ud->user_login ); 575 575 } 576 576 } … … 618 618 * @package BuddyPress Core 619 619 * @param $uid int User ID to check. 620 620 * @global $userdata WordPress user data for the current logged in user. 621 * @uses get_user data() WordPress function to fetch the userdata for a user ID621 * @uses get_usermeta() WordPress function to fetch the userdata for a user ID 622 622 * @return false on no match 623 623 * @return str the username of the matched user. 624 624 */ … … 628 628 if ( $uid == $userdata->ID ) 629 629 return 'You'; 630 630 631 if ( !$ud = get_user data($uid) )631 if ( !$ud = get_usermeta($uid) ) 632 632 return false; 633 633 634 634 return $ud->user_login; … … 642 642 * @package BuddyPress Core 643 643 * @param $uid int User ID to check. 644 644 * @global $userdata WordPress user data for the current logged in user. 645 * @uses get_user data() WordPress function to fetch the userdata for a user ID645 * @uses get_usermeta() WordPress function to fetch the userdata for a user ID 646 646 * @return false on no match 647 647 * @return str The URL for the user with no HTML formatting. 648 648 */ … … 652 652 if ( !is_numeric($uid) ) 653 653 return false; 654 654 655 $ud = get_user data($uid);655 $ud = get_usermeta($uid); 656 656 657 657 return $bp->root_domain . '/' . MEMBERS_SLUG . '/' . $ud->user_login . '/'; 658 658 } … … 664 664 * 665 665 * @package BuddyPress Core 666 666 * @param $uid int User ID to check. 667 * @uses get_user data() WordPress function to fetch the userdata for a user ID667 * @uses get_usermeta() WordPress function to fetch the userdata for a user ID 668 668 * @return false on no match 669 669 * @return str The email for the matched user. 670 670 */ 671 671 function bp_core_get_user_email( $uid ) { 672 $ud = get_user data($uid);672 $ud = get_usermeta($uid); 673 673 return $ud->user_email; 674 674 } 675 675 … … 689 689 * @param $just_link bool Disable full name and HTML and just return the URL text. Default false. 690 690 * @param $no_you bool Disable replacing full name with "You" when logged in user is equal to the current user. Default false. 691 691 * @global $userdata WordPress user data for the current logged in user. 692 * @uses get_user data() WordPress function to fetch the userdata for a user ID692 * @uses get_usermeta() WordPress function to fetch the userdata for a user ID 693 693 * @uses bp_fetch_user_fullname() Returns the full name for a user based on user ID. 694 694 * @uses bp_core_get_userurl() Returns the URL for the user with no anchor tag based on user ID 695 695 * @return false on no match … … 698 698 function bp_core_get_userlink( $user_id, $no_anchor = false, $just_link = false, $deprecated = false, $with_s = false ) { 699 699 global $userdata; 700 700 701 $ud = get_user data($user_id);701 $ud = get_usermeta($user_id); 702 702 703 703 if ( !$ud ) 704 704 return false; … … 737 737 * @param $user_id string The user ID of the user. 738 738 * @param 739 739 * @uses bp_fetch_user_fullname() Returns the full name for a user based on user ID. 740 * @uses get_user data() Fetches a new userdata object for the user ID passed.740 * @uses get_usermeta() Fetches a new userdata object for the user ID passed. 741 741 * @return Either the users full name, or the display name. 742 742 */ 743 743 function bp_core_global_user_fullname( $user_id ) { 744 744 if ( function_exists('bp_fetch_user_fullname') ) { 745 745 return bp_fetch_user_fullname( $user_id, false ); 746 746 } else { 747 $ud = get_user data($user_id);747 $ud = get_usermeta($user_id); 748 748 return $current_user->display_name; 749 749 } 750 750 } … … 789 789 * 790 790 * @package BuddyPress Core 791 791 * @param $uid int User ID to check. 792 * @uses get_user data() WordPress function to fetch the userdata for a user ID792 * @uses get_usermeta() WordPress function to fetch the userdata for a user ID 793 793 * @return false on no match 794 794 * @return str The email for the matched user. 795 795 */