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
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);
This reply has been marked as private.
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.