Skip to:
Content

BuddyPress.org

Changeset 5548


Ignore:
Timestamp:
12/13/2011 08:37:12 PM (13 years ago)
Author:
johnjamesjacoby
Message:

Use get_user_by() instead of get_userdatabylogin(). See #3851.

Location:
branches/1.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5/bp-core/bp-core-catchuri.php

    r5360 r5548  
    187187
    188188        // Make sure there's a user corresponding to $bp_uri[0]
    189         if ( !empty( $bp->pages->members ) && !empty( $bp_uri[0] ) && $root_profile = get_userdatabylogin( $bp_uri[0] ) ) {
     189        if ( !empty( $bp->pages->members ) && !empty( $bp_uri[0] ) && $root_profile = get_user_by( 'login', $bp_uri[0] ) ) {
    190190
    191191            // Force BP to recognize that this is a members page
  • branches/1.5/bp-members/bp-members-functions.php

    r5036 r5548  
    658658 * @param $auth_obj The WP authorization object
    659659 * @param $username The username of the user logging in.
    660  * @uses get_userdatabylogin() Get the userdata object for a user based on their username
     660 * @uses get_user_by() Get the userdata object for a user based on their username
    661661 * @uses bp_core_redirect() Safe redirect to a page
    662662 * @return $auth_obj If the user is not a spammer, return the authorization object
     
    665665    global $bp;
    666666
    667     if ( !$user = get_userdatabylogin( $username ) )
     667    if ( !$user = get_user_by( 'login', $username ) )
    668668        return $auth_obj;
    669669
Note: See TracChangeset for help on using the changeset viewer.