Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/05/2024 02:02:54 AM (2 years ago)
Author:
imath
Message:

Site invitations: avoid duplicate activation emails

Props dcavins, vapvarun, emaralive

Fixes #9206

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-members/bp-members-invitations.php

    r13629 r13945  
    158158        );
    159159
    160         // If pending invitations exist, send the verification mail.
     160        // If pending invitations exist, but we're not currently accepting an invite, send the verification mail.
    161161        if ( $invites ) {
    162                 $send = true;
     162                // Is the current request actually a response to an invitation?
     163                $maybe_inv = bp_get_members_invitation_from_request();
     164
     165                // Not currently accepting a request.
     166                if ( ! $maybe_inv->id ) {
     167                        $send = true;
     168                }
    163169        }
    164170
Note: See TracChangeset for help on using the changeset viewer.