Ticket #4187: 4187.patch
File 4187.patch, 2.1 KB (added by , 13 years ago) |
---|
-
bp-members/bp-members-screens.php
function bp_core_screen_signup() { 163 163 // Let's compact any profile field info into usermeta 164 164 $profile_field_ids = explode( ',', $_POST['signup_profile_field_ids'] ); 165 165 166 // Loop through the posted fields formatting any datebox values then add to usermeta 166 // Loop through the posted fields formatting any datebox values then add to usermeta - @todo This logic should be shared with the same in xprofile_screen_edit_profile() 167 167 foreach ( (array) $profile_field_ids as $field_id ) { 168 if ( !isset( $_POST['field_' . $field_id] ) ) { 169 if ( isset( $_POST['field_' . $field_id . '_day'] ) ) 170 $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $_POST['field_' . $field_id . '_day'] . $_POST['field_' . $field_id . '_month'] . $_POST['field_' . $field_id . '_year'] ) ); 168 if ( ! isset( $_POST['field_' . $field_id] ) ) { 169 170 if ( ! empty( $_POST['field_' . $field_id . '_day'] ) && ! empty( $_POST['field_' . $field_id . '_month'] ) && ! empty( $_POST['field_' . $field_id . '_year'] ) ) { 171 // Concatenate the values 172 $date_value = $_POST['field_' . $field_id . '_day'] . ' ' . $_POST['field_' . $field_id . '_month'] . ' ' . $_POST['field_' . $field_id . '_year']; 173 174 // Turn the concatenated value into a timestamp 175 $_POST['field_' . $field_id] = date( 'Y-m-d H:i:s', strtotime( $date_value ) ); 176 } 171 177 } 172 178 173 179 if ( !empty( $_POST['field_' . $field_id] ) ) … … function bp_core_screen_signup() { 195 201 else 196 202 $wp_user_id = bp_core_signup_user( $_POST['signup_username'], $_POST['signup_password'], $_POST['signup_email'], $usermeta ); 197 203 198 if ( is_wp_error( $wp_user_id ) ) { 204 if ( is_wp_error( $wp_user_id ) ) { 199 205 $bp->signup->step = 'request-details'; 200 206 bp_core_add_message( $wp_user_id->get_error_message(), 'error' ); 201 207 } else {