How to force users to log in to download files?

It doesn't seem elgg offers that option, in other words, the person can see there is a link and a description in there, but he needs to loggin, if he wants to download it.

Is there a pluggin that can do that?

  • Thax a lot, ur code helped me to make my own code:

     

    if(!elgg_is_logged_in()){

    $acesse .= elgg_echo('market:please-loggin');

    $body .= "<div style=\"text-align:center\"><br />

    <br />

    <font size=\"+2\" color=\"#FF0000\"><b>{$acesse} ";

    $body .= "<div>";

    $body .= elgg_view('output/url', array(

    'href' => elgg_get_site_url() . "mod/custom_index/views/default/page/layouts/popup-registerlogin.php",

    'text' => elgg_echo('market:click-to-login'),

    'class' => "elgg-lightbox",

    ));

     

    $body .= "</div></b></font>";

     

     

    }

     

    else {

     

    $body .="

     

     

     

     

    {$seleciona}

    And so on...