Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #18961



    I’m currently evaluating lots of download manager plugins and so far, yours is the nicest :-)

    Just one barrier for me –

    All my download attachments will be on private pages which only display the content if the user is logged in, and a member of the specific group (as defined by a custom user field on their profile).

    However, if I log in and copy the download link, then paste it into a new browser window where I am not logged in, it still serves me the file. So this means people could potentially share download links and I need to protect against that.

    How can I achieve this please?

    Many thanks



    In case it’s useful to anyone else, I’ve bodged a fix for this.
    This will disable the plugin for any user who is not logged in, so if any logged in users try to share direct download links with non-logged in users, they will just get a white screen.

    Create a new file called disable-logged-out-plugin.php with this code, and then upload it to the mu-plugins in your wp-content folder:

    add_filter( ‘option_active_plugins’, ‘disable_logged_out_plugin’ );
    function disable_logged_out_plugin( $plugins ) {
    require (ABSPATH . WPINC . ‘/pluggable.php’);
    if ( !is_user_logged_in() & !is_admin() ) {
    $key = array_search( ‘download-attachments/download-attachments.php’ , $plugins );
    if ( false !== $key ) {
    unset( $plugins[ $key ] );
    return $plugins;



    Hi from new user and WP inexpert!!!
    Where is “mu” folder where to upload your php file?



    If you use FTP to access your server, just navigate to the wp-content folder and create a new folder called mu-plugins if you don’t already have one there.



    Thank you for the feedback, it helped me

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.