Skip to:
Content

BuddyPress.org

Changeset 5626


Ignore:
Timestamp:
01/09/2012 07:18:10 PM (13 years ago)
Author:
djpaul
Message:

Don't use deprecated get_user_by_email(). Fixes #3914

Location:
branches/1.5
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/1.5

    • Property svn:mergeinfo changed
      /trunkmerged: 5233
  • branches/1.5/bp-blogs/bp-blogs-functions.php

    r5356 r5626  
    237237
    238238    // Get the user_id from the comment author email.
    239     $user    = get_user_by_email( $recorded_comment->comment_author_email );
     239    $user    = get_user_by( 'email', $recorded_comment->comment_author_email );
    240240    $user_id = (int)$user->ID;
    241241
  • branches/1.5/bp-core/bp-core-avatars.php

    r4907 r5626  
    585585
    586586    // If passed a string and that string returns a user, get the $id
    587     else if ( is_string( $user ) && ( $user_by_email = get_user_by_email( $user ) ) )
     587    else if ( is_string( $user ) && ( $user_by_email = get_user_by( 'email', $user ) ) )
    588588        $id = $user_by_email->ID;
    589589
  • branches/1.5/bp-members/bp-members-functions.php

    r5548 r5626  
    446446 * @param $email str The email address for the user.
    447447 * @uses bp_core_get_userlink() BuddyPress function to get a userlink by user ID.
    448  * @uses get_user_by_email() WordPress function to get userdata via an email address
     448 * @uses get_user_by() WordPress function to get userdata via an email address
    449449 * @return str The link to the users home base. False on no match.
    450450 */
    451451function bp_core_get_userlink_by_email( $email ) {
    452     $user = get_user_by_email( $email );
     452    $user = get_user_by( 'email', $email );
    453453    return apply_filters( 'bp_core_get_userlink_by_email', bp_core_get_userlink( $user->ID, false, false, true ) );
    454454}
Note: See TracChangeset for help on using the changeset viewer.