File download stops working with version 3.1.11, WP 3.7

WP-Filebase Pro Forums General Support File download stops working with version 3.1.11, WP 3.7

This topic contains 3 replies, has 4 voices, and was last updated by  Fabian 3 years, 10 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #987

    Nicholas
    Participant

    I updated this weekend and found that the file download stopped working for all users except admins. The files affected are those for which permissions are required (Subscriber and above).

    I’ve made a workaround to get it working for my site at http://sptr.net. In classes/Item.php, within function CurUserCanAccess($for_tpl=false, $user = null), above the loop that checks user roles, you have to populate the roles array by calling get_role_caps(), thus:

    if(empty($frs)) return true; // item is for everyone!		
    
    $user->get_role_caps();
    
    foreach($user->roles as $ur) { // check user roles against item roles
    	if(in_array($ur, $frs))
    		return true;
    }

    Fabi, check it out and see if this is OK? Thanks.

    #1007

    Michael123
    Participant

    experiencing the same problem here

    #1014

    Debra Reed
    Participant

    Same problem. Nicholas your fix is working for me. Thanks!

    #1017

    Fabian
    Participant

    Will be fixed with the next update!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.