Ticket #8003: 8003.disable-user-lookup.patch
File 8003.disable-user-lookup.patch, 2.0 KB (added by , 6 years ago) |
---|
-
src/bp-core/classes/class-bp-email-recipient.php
51 51 * @param string|array|int|WP_User $email_or_user Either a email address, user ID, WP_User object, 52 52 * or an array containing any combination of the above. 53 53 * @param string $name Optional. If $email_or_user is a string, this is the recipient's name. 54 * @param bool $lookup_name Optional. If $email_or_user is an email address, look up the email address 55 * in WordPress to find the user's name. Default: true. 54 56 */ 55 public function __construct( $email_or_user, $name = '' ) {57 public function __construct( $email_or_user, $name = '', $lookup_name = true ) { 56 58 $name = sanitize_text_field( $name ); 57 59 58 60 // User ID, email address or WP_User object. … … 92 94 } 93 95 94 96 // Still no user object; try to query user by email address. 95 if ( empty( $this->user_object ) ) {97 if ( empty( $this->user_object ) && true === $lookup_name ) { 96 98 $this->get_user( 'search-email' ); 97 99 } 98 100 -
src/bp-core/classes/class-bp-email.php
738 738 * @return BP_Email 739 739 */ 740 740 public function set_from( $email_address, $name = '' ) { 741 $from = new BP_Email_Recipient( $email_address, $name );741 $from = new BP_Email_Recipient( $email_address, $name, false ); 742 742 743 743 /** 744 744 * Filters the new value of the email's "from" property. … … 810 810 * @return BP_Email 811 811 */ 812 812 public function set_reply_to( $email_address, $name = '' ) { 813 $reply_to = new BP_Email_Recipient( $email_address, $name );813 $reply_to = new BP_Email_Recipient( $email_address, $name, false ); 814 814 815 815 /** 816 816 * Filters the new value of the email's "reply to" property.