Skip to content

Commit

Permalink
Force reload on remove_all_caps.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Jan 30, 2025
1 parent 623d977 commit 64cefd6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/wp-includes/class-wp-user.php
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,8 @@ public function remove_cap( $cap ) {
*/
public function remove_all_caps() {
global $wpdb;
$this->caps = array();
$this->caps = array();
$this->loaded_caps = false;
delete_user_meta( $this->ID, $this->cap_key );
delete_user_meta( $this->ID, $wpdb->get_blog_prefix() . 'user_level' );
$this->get_role_caps();
Expand Down

0 comments on commit 64cefd6

Please sign in to comment.