Changeset 12869 for trunk/src/bp-xprofile/screens/edit.php
- Timestamp:
- 03/22/2021 07:45:24 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/screens/edit.php
r11928 r12869 50 50 $posted_field_ids = wp_parse_id_list( $_POST['field_ids'] ); 51 51 $is_required = array(); 52 53 $bp_displayed_user = bp_get_displayed_user(); 54 $bp_displayed_user->updated_keys = array(); 52 55 53 56 // Loop through the posted fields formatting any datebox values then validate the field. … … 127 130 do_action( 'xprofile_updated_profile', bp_displayed_user_id(), $posted_field_ids, $errors, $old_values, $new_values ); 128 131 132 // Some WP User keys have been updated: let's update the WP fiels all together. 133 if ( $bp_displayed_user->updated_keys ) { 134 $user_id = wp_update_user( 135 array_merge( 136 array( 137 'ID' => bp_displayed_user_id(), 138 ), 139 $bp_displayed_user->updated_keys 140 ) 141 ); 142 143 $bp_displayed_user->updated_keys = array(); 144 145 if ( is_wp_error( $user_id ) ) { 146 $errors = true; 147 } 148 } 149 129 150 // Set the feedback messages. 130 151 if ( !empty( $errors ) ) {
Note: See TracChangeset
for help on using the changeset viewer.