Changeset 5841
- Timestamp:
- 02/25/2012 06:25:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/bp-members/bp-members-signup.php
r5807 r5841 151 151 // Finally, sign up the user and/or blog 152 152 if ( isset( $_POST['signup_with_blog'] ) && is_multisite() ) 153 bp_core_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta );153 $wp_user_id = bp_core_signup_blog( $blog_details['domain'], $blog_details['path'], $blog_details['blog_title'], $_POST['signup_username'], $_POST['signup_email'], $usermeta ); 154 154 else 155 bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta ); 156 157 $bp->signup->step = 'completed-confirmation'; 155 $wp_user_id = bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta ); 156 157 if ( is_wp_error( $wp_user_id ) ) { 158 $bp->signup->step = 'request-details'; 159 bp_core_add_message( strip_tags( $wp_user_id->get_error_message() ), 'error' ); 160 } else { 161 $bp->signup->step = 'completed-confirmation'; 162 } 158 163 } 159 164 … … 305 310 $user_email = sanitize_email( $user_email ); 306 311 312 // Apply any user_login filters added by BP or other plugins before validating 313 $user_name = apply_filters( 'pre_user_login', $user_name ); 314 307 315 if ( empty( $user_name ) ) 308 316 $errors->add( 'user_name', __( 'Please enter a username', 'buddypress' ) ); … … 391 399 ) ); 392 400 393 if ( empty( $user_id ) ) {401 if ( is_wp_error( $user_id ) || empty( $user_id ) ) { 394 402 $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' ) ) ); 395 403 return $errors;
Note: See TracChangeset
for help on using the changeset viewer.