Change WordPress user roles and capabilities Forums Bug Reports Gravity Forms Restrictions No Longer Working Reply To: Gravity Forms Restrictions No Longer Working

#7871
Vladimir
Keymaster

I found and fixed the bug. I will include it to the next update.

To @epss: I uploaded to dev copy the updated file user-role-editor-pro/pro/includes/classes/gf-access-user.php.

The begin of get_roles_data() function was replaced from:


    private static function get_roles_data( $user_id, $user_what_to_do ) {       
        $all_forms = array();
        $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY );
        if ( !is_array( $access_data ) ) {
            return $all_forms;
        }        
        $what_to_do = -1;   // Not initialized
 

to


    private static function get_roles_data( $user_id, $user_what_to_do ) {                
        $access_data = get_option( URE_GF_Access_Role::ACCESS_DATA_KEY );
        if ( !is_array( $access_data ) ) {
            $data = array(
                'what_to_do'=>1,
                'forms_list'=>array()
        );
            return $data;
        }        
        $all_forms = array();        
        $what_to_do = -1;   // Not initialized