Skip to:
Content

BuddyPress.org

Changeset 10509


Ignore:
Timestamp:
02/04/2016 10:21:53 PM (9 years ago)
Author:
dcavins
Message:

BP Email: Cast user ID as integer in group emails.

Make sure that user IDs that are numeric strings
are cast as integers for compatibility with
bp_send_email().

See #6873.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/bp-groups-notifications.php

    r10479 r10509  
    7878            ),
    7979        );
    80         bp_send_email( 'groups-details-updated', $user_id, $args );
     80        bp_send_email( 'groups-details-updated', (int) $user_id, $args );
    8181    }
    8282
     
    139139        ),
    140140    );
    141     bp_send_email( 'groups-membership-request', $admin_id, $args );
     141    bp_send_email( 'groups-membership-request', (int) $admin_id, $args );
    142142}
    143143
     
    185185
    186186    if ( ! empty( $accepted ) ) {
    187         bp_send_email( 'groups-membership-request-accepted', $requesting_user_id, $args );
     187        bp_send_email( 'groups-membership-request-accepted', (int) $requesting_user_id, $args );
    188188    } else {
    189         bp_send_email( 'groups-membership-request-rejected', $requesting_user_id, $args );
     189        bp_send_email( 'groups-membership-request-rejected', (int) $requesting_user_id, $args );
    190190    }
    191191}
     
    238238        ),
    239239    );
    240     bp_send_email( 'groups-member-promoted', $user_id, $args );
     240    bp_send_email( 'groups-member-promoted', (int) $user_id, $args );
    241241}
    242242add_action( 'groups_promoted_member', 'groups_notification_promoted_member', 10, 2 );
     
    289289        ),
    290290    );
    291     bp_send_email( 'groups-invitation', $invited_user_id, $args );
     291    bp_send_email( 'groups-invitation', (int) $invited_user_id, $args );
    292292}
    293293
Note: See TracChangeset for help on using the changeset viewer.