• Hi guys,

    We’re getting Editor roles that aren’t being recognized for enough of our Editors for the last month to finally check with you guys. We’ve been able to resolve issues by changing them to a different role, then selecting Editor in both the main drop down menu and also the capabilities module in a subsequent change back to the intended status. Have you seen this and do you have any idea how we might rule out your plugin as the culprit. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Vladimir Garagulya

    (@shinephp)

    Hi,

    It may be a known issue. WordPress makes some internal calculations on user permissions when user is granted a new role ($this->update_user_level_from_caps();):

    
    /**
    	 * Add role to user.
    	 *
    	 * Updates the user's meta data option with capabilities and roles.
    	 *
    	 * @since 2.0.0
    	 *
    	 * @param string $role Role name.
    	 */
    	public function add_role( $role ) {
    		if ( empty( $role ) ) {
    			return;
    		}
    
    		$this->caps[ $role ] = true;
    		update_user_meta( $this->ID, $this->cap_key, $this->caps );
    		$this->get_role_caps();
    		$this->update_user_level_from_caps();
    
    		/**
    		 * Fires immediately after the user has been given a new role.
    		 *
    		 * @since 4.3.0
    		 *
    		 * @param int    $user_id The user ID.
    		 * @param string $role    The new role.
    		 */
    		do_action( 'add_user_role', $this->ID, $role );
    	}
    

    So if you change ‘editor’ role, you have to reassign it to users which has it making the steps you described.

    Thread Starter abruski17

    (@abruski17)

    Here’s the exact steps.

    We take a user role of Customer and change it to Editor while also adding another custom role. Then that user is losing their WP admin bar. We had two separate users lose theirs tonight at the same time.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Editor Access Intermittent – Want to Rule Out URE’ is closed to new replies.