Changeset 3622 for trunk/bp-core/bp-core-signup.php
- Timestamp:
- 12/30/2010 09:13:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-signup.php
r3621 r3622 223 223 $user = apply_filters( 'bp_core_activate_account', bp_core_activate_signup( $_GET['key'] ) ); 224 224 225 /* If there w aserrors, add a message and redirect */226 if ( $user->errors) {227 bp_core_add_message( __( 'There was an error activating your account, please try again.', 'buddypress'), 'error' );225 /* If there were errors, add a message and redirect */ 226 if ( !empty( $user->errors ) ) { 227 bp_core_add_message( $user->get_error_message(), 'error' ); 228 228 bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG ); 229 229 } … … 435 435 ) ); 436 436 437 if ( is_wp_error( $user_id ) || !$user_id) {437 if ( empty( $user_id ) ) { 438 438 $errors->add( 'registerfail', sprintf( __('<strong>ERROR</strong>: Couldn’t register you... please contact the <a href="mailto:%s">webmaster</a> !', 'buddypress' ), get_option( 'admin_email' ) ) ); 439 439 return $errors; … … 495 495 $user = wpmu_activate_signup( $key ); 496 496 497 /* If there was errors, add a message and redirect */ 498 if ( $user->errors ) { 499 bp_core_add_message( __( 'There was an error activating your account, please try again.', 'buddypress' ), 'error' ); 500 bp_core_redirect( $bp->root_domain . '/' . BP_ACTIVATION_SLUG ); 497 /* If there were errors, add a message and redirect */ 498 if ( !empty( $user->errors ) ) { 499 return $user; 501 500 } 502 501
Note: See TracChangeset
for help on using the changeset viewer.