Skip to content

Kazimer Corp

  • Projects
  • Articles
  • Downloads
  • Contact

edit_user

WordPress user profile update deletes custom roles (fixed)

November 26, 2021December 22, 2019 by Kazimer Corp

WordPress allows you to add custom security roles and capabilities for users. Unfortunately, the code that updates a user profile deletes any custom roles assigned to a user when saving a user profile. This article shows a work-around that restores custom roles after a user profile update deletes them.

Categories Programming, Tutorials, WordPress Tags bug fix, custom roles, edit_user, edit_user_profile, how to, roles and capabilities, show_user_profile, solution, User Profile editor, user_profile_update_errors, WordPress, wp_update_user, WP_User

Recent Articles

  • jQuery.submit() form data not submitted.
  • My images are messed up in WordPress 5.9
  • Fix Elementor’s “Exit to Dashboard” button
  • How to use CloudFlare’s Server-Side Exclude in WordPress
  • Fail2Ban CloudFlare action using Authorization Bearer Token

Categories

  • Hardware
  • Joomla!
  • Linux
  • Programming
  • Security
  • Tutorials
  • Windows
  • WordPress
  • Contact Info
  • Privacy Policy
©2002 - 2022 • Kazimer Corp.