Skip to:
Content

BuddyPress.org

Ticket #6873: 6873-user-ids.patch

File 6873-user-ids.patch, 2.2 KB (added by dcavins, 9 years ago)

Send user IDs as integers, not numeric strings.

  • src/bp-groups/bp-groups-notifications.php

    diff --git src/bp-groups/bp-groups-notifications.php src/bp-groups/bp-groups-notifications.php
    index 9d1c62f..5a7a54f 100644
    function groups_notification_group_updated( $group_id = 0, $old_group = null ) { 
    7777                                'group.name'   => $group->name,
    7878                        ),
    7979                );
    80                 bp_send_email( 'groups-details-updated', (int) $user_id, $args );
     80                bp_send_email( 'groups-details-updated', $user_id, $args );
    8181        }
    8282
    8383        /**
    function groups_notification_new_membership_request( $requesting_user_id = 0, $a 
    138138                        'requesting-user.name' => bp_core_get_user_displayname( $requesting_user_id ),
    139139                ),
    140140        );
    141         bp_send_email( 'groups-membership-request', (int) $admin_id, $args );
     141        bp_send_email( 'groups-membership-request', $admin_id, $args );
    142142}
    143143
    144144/**
    function groups_notification_membership_request_completed( $requesting_user_id = 
    184184        );
    185185
    186186        if ( ! empty( $accepted ) ) {
    187                 bp_send_email( 'groups-membership-request-accepted', (int) $requesting_user_id, $args );
     187                bp_send_email( 'groups-membership-request-accepted', $requesting_user_id, $args );
    188188        } else {
    189                 bp_send_email( 'groups-membership-request-rejected', (int) $requesting_user_id, $args );
     189                bp_send_email( 'groups-membership-request-rejected', $requesting_user_id, $args );
    190190        }
    191191}
    192192add_action( 'groups_membership_accepted', 'groups_notification_membership_request_completed', 10, 3 );
    function groups_notification_promoted_member( $user_id = 0, $group_id = 0 ) { 
    237237                        'user.id'     => $user_id,
    238238                ),
    239239        );
    240         bp_send_email( 'groups-member-promoted', (int) $user_id, $args );
     240        bp_send_email( 'groups-member-promoted', $user_id, $args );
    241241}
    242242add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
    243243
    function groups_notification_group_invites( &$group, &$member, $inviter_user_id 
    288288                        'invites.url'          => esc_url( $invited_link . '/invites/' ),
    289289                ),
    290290        );
    291         bp_send_email( 'groups-invitation', (int) $invited_user_id, $args );
     291        bp_send_email( 'groups-invitation', $invited_user_id, $args );
    292292}
    293293
    294294/** Notifications *************************************************************/