Display Touchstone on access denied Drupal 5.x pages
I came up with a method of displaying a link to Touchstone on access denied pages in Drupal 5.x. This would probably work for Drupal 6.x as well. Here is how I set it up:
1.) Create a new page node. Title it "Access Denied" and use this content:
<?php
global $user;
if ($user->uid) { // this user is already logged in print "Access Denied: You do not have access to this page."; } else { print "Access Denied: You do not have access to this page."; $dest = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
echo 'You may need to login'; } ?>
Make a note of the node ID.
2.) Under admin => site configuration => error reporting enter 'node/[node id from new page]' under Default 403.
That's it. I think this could probably be improved on, but it's a start. I also think the user could be redirected automatically, but I decided to just create a link.
- Login to post comments

