Restricting access to unit attachments

Home Forums Legacy Support Support queries How-to & Troubleshooting Restricting access to unit attachments

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #145076
    roath
    Spectator
    Hello, How can I protect/restrict the access to the attachments of a unit so that only logged users AND enrolled on the course can access it? At the moment, if I copy the link of the attachment and sign out from the site I can still access it. Thank you. Best regards, Rodrigo
    #145128
    Mark Morgan
    Spectator
    Hi, In wplms usually non logged in users can not see the attachments of units. To enable this add the following code in wplms_customizer plugin -> wplms-customizer.php file. Code: apply_filters('wplms_unit_attachments',1,$id); add_filter('wplms_unit_attachments',function($flag,$id){ if( !is_user_logged_in() ){ $flag = 0; } return $flag; }10,2);
    #145182
    roath
    Spectator
    This reply has been marked as private.
    #145295
    Mark Morgan
    Spectator
    Hi, Yes,In wplms by default non enrolled users can't access the unit attachments . The uploads folder files are managed by wordpress itself and not by us, you can search this in htacess file.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Restricting access to unit attachments’ is closed to new replies.