[support] access denied page

Nicolas Tostin nicolast at logis.com.mx
Fri Dec 14 22:33:23 UTC 2007


I would create a dedicated node to handle "page 403" then I would put in there custom php like:
<?php
global $user;
if ($user->uid == 0) {
  drupal_goto('user/login');
}
else {
  echo 'Access denied';
}

?>

I think this would help you ;-)
  ----- Original Message ----- 
  From: John Barreiros 
  To: support at drupal.org 
  Sent: Friday, December 14, 2007 3:11 PM
  Subject: [support] access denied page


  Hi all.

  This is what I'm trying to achieve.

  - If the user is not logged in and they try to access a private page, they are taken to the login page.
  - If the user is logged in and they try to access a page they can't access, they are taken to an "access denied" page. 

  The first seems easy enough. I just changed the "Default 403 page" to user/login. 

  But, I can't figure out the second.

  Any ideas?




------------------------------------------------------------------------------


  -- 
  [ Drupal support list | http://lists.drupal.org/ ]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20071214/1f21d163/attachment.htm 


More information about the support mailing list