Once a user clicks on the Update Profile button, all the custom fields need to be saved automatically into the database. So, we have to define another two actions called edit_user_profile_update and personal_options_update. We have to add them inside the constructor of the WPWAF_User class, as shown in the following code:
add_action('edit_user_profile_update', array($this, "save_profile_fields")); add_action('personal_options_update', array($this, "save_profile_fields"));
Actions hooks defined in the preceding code are generally used to update additional profile fields. So, we will invoke the save_profile_fields function of a user model to cater to the persisting tasks. Consider the implementation ...