Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/06/2019 07:19:44 PM (7 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.

Fixes #8174 (Branch 5.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/5.0/src/bp-core/bp-core-filters.php

    r12349 r12504  
    478478
    479479        $salutation = $user;
    480         if ( $signups ) {
     480        if ( $signups && bp_is_active( 'xprofile' ) ) {
    481481                $signup = $signups['signups'][0];
    482482                if ( isset( $signup->meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) {
     
    540540
    541541        $salutation = $user;
    542         if ( isset( $meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) {
     542        if ( bp_is_active( 'xprofile' ) && isset( $meta[ 'field_' . bp_xprofile_fullname_field_id() ] ) ) {
    543543                $salutation = $meta[ 'field_' . bp_xprofile_fullname_field_id() ];
    544544        } elseif ( $user_id ) {
Note: See TracChangeset for help on using the changeset viewer.