Changeset 6083
- Timestamp:
- 06/13/2012 08:15:04 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-members/bp-members-screens.php
r5860 r6083 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 … … 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' );
Note: See TracChangeset
for help on using the changeset viewer.