Making WordPress.org

Changeset 12484


Ignore:
Timestamp:
03/20/2023 04:11:45 AM (3 years ago)
Author:
dd32
Message:

Helpscout: Remove +... from email addresses to work around HS limitations around email addresses needing to be unique on every instance.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/api.wordpress.org/public_html/dotorg/helpscout/common.php

    r12483 r12484  
    328328    $emails = array_unique( array_merge( $hs_user->alternateEmails, [ $hs_user->email ] ) );
    329329
     330    // Allow add plus-addresses without the sub-routing to the list of emails to check.
     331    foreach ( $emails as $email ) {
     332        $e = preg_replace( '!^([^+]+)[+][^+]+@(.+)$!', '$1@$2', $email );
     333        if ( $e != $email ) {
     334            $emails[] = $e;
     335        }
     336    }
     337
    330338    // Sort emails by string length
    331339    usort( $emails, function( $a, $b ) {
Note: See TracChangeset for help on using the changeset viewer.