Skip to:
Content

BuddyPress.org

Changeset 8294


Ignore:
Timestamp:
04/18/2014 05:02:15 PM (11 years ago)
Author:
imath
Message:

In BP_Signup::activate(), make sure the user ID is defined before checking user_status

When Activating a signup from the Signups management screen, in case of an error, we need to first try to get the user id before checking his status.

Fixes #5559

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-classes.php

    r8184 r8294  
    566566            if ( ! empty( $user->errors ) ) {
    567567
    568                 $user_id = username_exists( $signup->user_login ) && 2 != self::check_user_status( $user_id );
    569 
    570                 if ( !empty( $user_id ) ) {
     568                $user_id = username_exists( $signup->user_login );
     569
     570                if ( 2 !== self::check_user_status( $user_id ) ) {
     571                    $user_id = false;
     572                }
     573
     574                if ( empty( $user_id ) ) {
    571575
    572576                    // Status is not 2, so user's account has been activated
Note: See TracChangeset for help on using the changeset viewer.