Is there such a condition in rules ?
I would like redirect user from 403 page to register form and display a system message.
I can't find this condition.
Any ideas ?
Thanks
Is there such a condition in rules ?
I would like redirect user from 403 page to register form and display a system message.
I can't find this condition.
Any ideas ?
Thanks
Comments
Comment #1
kirikintha commentedHi there, don't know if this is a dead subject or not:
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ac...
This is the access denied function.
What I did using rules was use the: "User page has been viewed" event.
Then I made the criteria I needed for denying access - this is up to you at this point.
Then, I used the "Execute PHP" condition, with drupal_access_denied in the textfield - voila role based access denial.
Rules is so awesome!
Comment #2
mitchell commentedComment #3
mitchell commentedactually, the OP is for a condition, but #1 is for a condition.
Comment #4
mitchell commentedI must have misunderstood this last time I read it.
Comment #5
fashionary commentedI need to display some customized message and do some actions upon access denial.
The condition on Drupal access denied will be wonderful to do this.
Can someone help to make the condition?
+1
Comment #6
apt94jesse commentedA quick workaround for this could be as follows:
1. Create a page to act as an entry point: ie. /error-page
2. Set your 403 page in Site Config to /error-page
3. Use the Rules Module with an event where /error-page is viewed.
Now you can use all the conditions in Rules to redirect based on roles, user name, etc etc.
Should work like a charm if I understand the issue correctly.
Comment #7
Paul B commentedThat doesn't seem to work with the 'path has url alias' condition. It works if I use a data comparison on the node ID.
Comment #8
tomogden commentedThis works for me. How do you count recursive attempts from the same user using Rules? It would be a shame to block someone after a single failed password attempt.
Comment #9
tr commentedLet's handle this in #2636482: Add event for 404 not found