Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/06/2019 06:44:36 PM (5 years ago)
Author:
imath
Message:

Make sure users can register when the xProfile component is not active

In version 5.0.0, we've introduced an improvement to use the display name as the salutation in signup emails (see [12349]). To do so we rely on an xProfile's component function. When this component is not active, the function is also not available causing a fatal error and preventing the activation email to be sent. To fix this issue we are now checking the component is active before using the function to return the display name.

See #8174 (Trunk)

File:
1 edited

Legend:

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

    r12450 r12503  
    17771777        if ( apply_filters( 'bp_core_signup_send_activation_key', true, $user_id, $user_email, $activation_key, $usermeta ) ) {
    17781778            $salutation = $user_login;
    1779             if ( isset( $usermeta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) {
     1779            if ( bp_is_active( 'xprofile' ) && isset( $usermeta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) {
    17801780                $salutation = $usermeta[ 'field_' . bp_xprofile_fullname_field_id() ];
    17811781            }
Note: See TracChangeset for help on using the changeset viewer.