| 1 |
$Id: README.txt,v 1.7 2007/06/25 20:25:27 kbahey Exp $ |
$Id: README.txt,v 1.7.2.1 2008/09/13 02:36:40 kbahey Exp $ |
| 2 |
|
|
| 3 |
Copyright 2005 http://2bits.com |
Copyright 2005 http://2bits.com |
| 4 |
|
|
| 39 |
they login. |
they login. |
| 40 |
(Requires a minor change to common.inc, see INSTALL.txt for details). |
(Requires a minor change to common.inc, see INSTALL.txt for details). |
| 41 |
|
|
| 42 |
|
|
| 43 |
|
Redirecting upon login |
| 44 |
|
---------------------- |
| 45 |
|
Here is an example of how to add custom PHP to a 403 to give the user the |
| 46 |
|
option to login then redirect them to what they were after. |
| 47 |
|
|
| 48 |
|
<?php |
| 49 |
|
global $user; |
| 50 |
|
if ($user->uid == 0) { |
| 51 |
|
print '<p>If your user account has access to this page, please <a href="/user?' . |
| 52 |
|
drupal_get_destination() . '">log</a>.</p>'; |
| 53 |
|
} |
| 54 |
|
?> |
| 55 |
|
|
| 56 |
|
That way when there's a 403 they get redirected back to the page they were trying to access. |
| 57 |
|
The above should be better refined to fit "best practices", such as doing this in a template.php |
| 58 |
|
rather than code stored in the database, and probably call l() or url() so it works when clean |
| 59 |
|
URL's are disabled. |
| 60 |
|
|
| 61 |
|
Thanks to: Andrew Berry (http://drupal.org/user/71291 deviantintegral). |
| 62 |
|
|
| 63 |
Database |
Database |
| 64 |
-------- |
-------- |
| 65 |
This module does not require any new database tables to be installed. |
This module does not require any new database tables to be installed. |