Hi,

I want to disable links in Drupal Forum for unregistered users. These links point to Downloads which are located on MegaUpload and I want only registered users to be able to download files.

The Drupal Website is Handy Forums
Thanks.

EggDir - General Web Directory

Comments

alihammad’s picture

When you provide links check for uid like this

if ($user->uid != 0) return TRUE;// 0 goes for anonymous users , every other uid is a registered user including uid 1, the admin.

This is helpful if you yourself are writing the url but if your users are adding those urls then you might have to restrict the content type from view in the first place using "access control" from the core.

Ali Hammad Raza
WordsValley