<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I would create a dedicated node to handle "page
403" then I would put in there custom php like:</FONT></DIV>
<DIV><FONT face=Arial size=2><?php</FONT></DIV>
<DIV><FONT face=Arial size=2>global $user;</FONT></DIV>
<DIV><FONT face=Arial size=2>if ($user->uid == 0) {</FONT></DIV>
<DIV><FONT face=Arial size=2> drupal_goto('user/login');</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2>else {</FONT></DIV>
<DIV><FONT face=Arial size=2> echo 'Access denied';</FONT></DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>?></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I think this would help you ;-)</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=johnbarreiros2@gmail.com href="mailto:johnbarreiros2@gmail.com">John
Barreiros</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=support@drupal.org
href="mailto:support@drupal.org">support@drupal.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, December 14, 2007 3:11
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [support] access denied
page</DIV>
<DIV><BR></DIV>Hi all.<BR><BR>This is what I'm trying to achieve.<BR><BR>- If
the user is not logged in and they try to access a private page, they are
taken to the login page.<BR>- 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.
<BR><BR>The first seems easy enough. I just changed the "Default 403 page" to
user/login. <BR><BR>But, I can't figure out the second.<BR><BR>Any
ideas?<BR><BR>
<P>
<HR>
<P></P>-- <BR>[ Drupal support list | http://lists.drupal.org/
]</BLOCKQUOTE></BODY></HTML>