#5537
Vladimir
Keymaster

Hi,

Thanks for this bug report. I confirm it. I will include a fix into upcoming version 4.50.1. I will publish it in a few days, just in case some other bugs will be discovered. Until that, it will be available as beta version 4.50.1.b1.

Quick fix – replace URE_Other_Role_Access::update_data() method with this version:


    public function update_data() {
    
        if (!isset($_POST['action']) || $_POST['action']!=='ure_update_other_roles_access') {
            return;
        }
        
        $editor = URE_Editor::get_instance();
        if (!current_user_can(self::OTHER_ROLES_ACCESS_CAP)) {
            $editor->set_notification( esc_html__('URE: you have not enough permissions to use this add-on.', 'user-role-editor') );
            return;
        }
        $ure_object_type = filter_input(INPUT_POST, 'ure_object_type', FILTER_SANITIZE_STRING);
        if ($ure_object_type!=='role' && $ure_object_type!=='user') {
            $editor->set_notification( esc_html__('URE: other roles access: Wrong object type. Data was not updated.', 'user-role-editor') );
            return;
        }
        $ure_object_name = filter_input(INPUT_POST, 'ure_object_name', FILTER_SANITIZE_STRING);
        if (empty($ure_object_name)) {
            $editor->set_notification( esc_html__('URE: other roles access: Empty object name. Data was not updated', 'user-role-editor') );
            return;
        }
                        
        if ($ure_object_type=='role') {
            $this->objects->save_access_data_for_role($ure_object_name);
        } else {
            $this->objects->save_access_data_for_user($ure_object_name);
        }
        
        $editor->set_notification( esc_html__('Other roles access data was updated successfully', 'user-role-editor') );
        
    }
    // end of update_data()