Skip to:
Content

BuddyPress.org

Ticket #2784: 2784.diff

File 2784.diff, 1.3 KB (added by wpmuguru, 14 years ago)
  • bp-core-signup.php

     
    219219
    220220                /* If there was errors, add a message and redirect */
    221221                if ( $user->errors ) {
    222                         bp_core_add_message( __( 'There was an error activating your account, please try again.', 'buddypress' ), 'error' );
     222                        bp_core_add_message( $user->get_error_message(), 'error' );
    223223                        bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG );
    224224                }
    225225
     
    348391                        'user_email' => $user_email
    349392                ) );
    350393
    351                 if ( is_wp_error( $user_id ) || !$user_id ) {
     394                if ( !$user_id ) {
    352395                        $errors->add( 'registerfail', sprintf( __('<strong>ERROR</strong>: Couldn&#8217;t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'buddypress' ), get_option( 'admin_email' ) ) );
    353396                        return $errors;
    354397                }
     
    408451                $user = wpmu_activate_signup( $key );
    409452
    410453                /* If there was errors, add a message and redirect */
    411                 if ( $user->errors ) {
    412                         bp_core_add_message( __( 'There was an error activating your account, please try again.', 'buddypress' ), 'error' );
    413                         bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG );
    414                 }
     454                if ( $user->errors )
     455                        return $user;
    415456
    416457                $user_id = $user['user_id'];
    417458