Title: Update profile
Last modified: December 22, 2020

---

# Update profile

 *  Resolved [backopio](https://wordpress.org/support/users/backopio/)
 * (@backopio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/update-profile-4/)
 * Hi,
    I’m having trouble with my users profile update feature.
 * Though the success message “Profile has been updated” is shown, as a matter of
   fact it’s not : the new values filled in the form are not saved.
 * Note that the config is ok and users have permission to modify their profile.
 * After a look at my code, there may be a problem with “um_account_secure_fields”
   which only contains “user_login” (when displaying corresponding array values)
   and no other field. I’m not sure about the understanding of this “um_account_secure_fields”
   but my guess is there should be all the fields i want to update, right ?
 * So i searched for the bit of custom code that displays these fields :
 *     ```
       function _get_ea_profile_fields(){
           $user_id = um_user('ID');
   
           UM()->fields()->editing = true;
   
           if($profile_form_id = _get_ea_um_profile_form_id()) {
             $post_data = UM()->query()->post_data($profile_form_id);
             if(!empty($post_data['custom_fields'])) {
               $fields = unserialize( $post_data['custom_fields'] );
               $fields = apply_filters( 'um_account_secure_fields', $fields, $user_id );
               uasort($fields, function ($a, $b) {
                 if(!isset($a['position']) || !isset($b['position'])) {
                   return 0;
                 }
                 if($a['position'] == $b['position']) {
                   return 0;
                 }
                 return ($a['position'] < $b['position']) ? -1 : 1;
               });
   
             }
           }
   
           return $fields;
         }
       ```
   
 * I thought that `$fields = apply_filters( 'um_account_secure_fields', $fields,
   $user_id );` would add the fields to the secure_fields array, but apparently,
   it’s not doing anything.
    Of course, i have a certain amount of custom fields
   in the $fields array, and they are very well displayed on the frontend form. 
   And the $user_id value is ok too.
 * Do you have any idea on how to fix this please ?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Champ Camba](https://wordpress.org/support/users/champsupertramp/)
 * (@champsupertramp)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/update-profile-4/#post-13826023)
 * Hi [@backopio](https://wordpress.org/support/users/backopio/)
 * UM Profile form is different from the Account form.
 * Have you tried [adding a custom tab in the Account form](https://www.champ.ninja/2020/05/add-a-custom-account-tab-with-profile-form-fields/)
   with the Profile form Shortcode?
 * Regards,
 *  Thread Starter [backopio](https://wordpress.org/support/users/backopio/)
 * (@backopio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/update-profile-4/#post-13843859)
 * To be more specific, my code is adding custom profile fields into the general
   tab of the account page.
    -  This reply was modified 5 years, 4 months ago by [backopio](https://wordpress.org/support/users/backopio/).
 *  Thread Starter [backopio](https://wordpress.org/support/users/backopio/)
 * (@backopio)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/update-profile-4/#post-13844038)
 * Thanks for the hint, the right way to do this was to add a custom tab filled 
   with profile fields, because profile fields can’t be added to general tab and
   saved.
    Problem solved !

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Update profile’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [profile](https://wordpress.org/support/topic-tag/profile/)
 * [update](https://wordpress.org/support/topic-tag/update/)

 * 3 replies
 * 2 participants
 * Last reply from: [backopio](https://wordpress.org/support/users/backopio/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/update-profile-4/#post-13844038)
 * Status: resolved