[drupal-support] Add an error message to upload.module

Abalieno abalieno at cesspit.net
Thu May 5 01:31:53 UTC 2005


I'm having a lot of users on my site trying to access the private files 
(only for logged in users) and finishing on a 404 page.

What I'd like to do is to change the 404 page with an "access denied page" 
or a custom one in order to give the correct feedback and write clearly that 
the file exists but it requires the log-in.

I guess the block should go within the else block:
function upload_file_download($file) {
  if (user_access('view uploaded files')) {
[...]
  }
  else {
  }
}

But how can I redirect to a specific page or display an error message?

-HRose / Abalieno 




More information about the drupal-support mailing list