Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
customerror
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
customerror
Commits
887cc28d
Commit
887cc28d
authored
16 years ago
by
Khalid Baheyeldin
Browse files
Options
Downloads
Patches
Plain Diff
Added recipe for 403 redirect.
parent
9251e30f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.txt
+20
-0
20 additions, 0 deletions
README.txt
with
20 additions
and
0 deletions
README.txt
+
20
−
0
View file @
887cc28d
...
@@ -39,6 +39,26 @@ Features
...
@@ -39,6 +39,26 @@ Features
they login.
they login.
(Requires a minor change to common.inc, see INSTALL.txt for details).
(Requires a minor change to common.inc, see INSTALL.txt for details).
Redirecting upon login
----------------------
Here is an example of how to add custom PHP to a 403 to give the user the
option to login then redirect them to what they were after.
<?php
global $user;
if ($user->uid == 0) {
print '<p>If your user account has access to this page, please <a href="/user?' .
drupal_get_destination() . '">log</a>.</p>';
}
?>
That way when there's a 403 they get redirected back to the page they were trying to access.
The above should be better refined to fit "best practices", such as doing this in a template.php
rather than code stored in the database, and probably call l() or url() so it works when clean
URL's are disabled.
Thanks to: Andrew Berry (http://drupal.org/user/71291 deviantintegral).
Database
Database
--------
--------
This module does not require any new database tables to be installed.
This module does not require any new database tables to be installed.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment