Can we have Login/Register link to anonymous users instead of showing nothing as they don't have permission to see webfm attachments ?

Comments

gauravkhambhala’s picture

Basically when user don't have permission to download, they should be able to see the file and Login/Register to download message.

kenorb’s picture

Basically Showing trees and Downloading for Anonymous doesn't work at all.
See here: #475294: No trees found in Public access

simplyrahul’s picture

I was looking for the same thing

If using CCK - goto file_formatter.inc in filefield folder in module

and paste the following code at the bottom

global $user;
if ($user->uid == 0) {
$url = "";
$link_text = "You must register or login to download attachments.";
}

  return '<div class="filefield-file clear-block">'. $icon . l($link_text, $url, $options) .'</div>';
}

I do not know how safe it it. But it worked for me. And it seems to be fine.
nhck’s picture

Status: Active » Closed (works as designed)

Dear gauravkhambhala,
you should be able to achieve this behavior by using logintoboggan. Its not related to webfm to provide a login screen I think.

Thank you.