[buddypress-trac] [BuddyPress Trac] #7042: bp_send_email function not working with numeric string for $to argument

buddypress-trac noreply at wordpress.org
Sat Apr 30 13:54:33 UTC 2016


#7042: bp_send_email function not working with numeric string for $to argument
--------------------------+-----------------------------
 Reporter:  WeddyWood     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  API - Emails  |    Version:  2.5.0
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 For example: `bp_send_email('email_type','4747',[])` not working with
 numeric user id.

 This not working because `is_int( $email_or_user )` used instead of
 `is_numeric()`.

 `__construct` method of BP_Email_Recipient class uses `get_user_by` WP
 function which uses `get_data_by` with `is_numeric()` function for `'id'`

 Therefore, for consistency of behavior need to use `is_numeric()`.

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/7042>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list