Skip to:
Content

BuddyPress.org

Changeset 11539


Ignore:
Timestamp:
04/27/2017 03:56:39 AM (8 years ago)
Author:
r-a-y
Message:

Friends: Fix issue with friendship email not being sent when using friends_add_friend() in some instances.

This commit ensures that user IDs passed to friends_add_friend() are
typecast as integers. This fixes issues with the friendship email not
being sent because the email sending logic requires the passed user IDs
to be integers and not numeric strings.

Props slaFFik, henry.wright.

Fixes #7506.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-friends/bp-friends-functions.php

    r11447 r11539  
    4545    // Setup the friendship data.
    4646    $friendship = new BP_Friends_Friendship;
    47     $friendship->initiator_user_id = $initiator_userid;
    48     $friendship->friend_user_id    = $friend_userid;
     47    $friendship->initiator_user_id = (int) $initiator_userid;
     48    $friendship->friend_user_id    = (int) $friend_userid;
    4949    $friendship->is_confirmed      = 0;
    5050    $friendship->is_limited        = 0;
Note: See TracChangeset for help on using the changeset viewer.