Posted by timebinder on June 9, 2012 at 11:49pm
Hi,
I had a user run into this the other day: normally, when a user logs in, I redirect them to a landing page with relevant items on it. Works fine unless the user forgets their password, at which time they get the link to log in one time then ...
they are redirected to the landing page I have a rule for.
It seems as though I have to add a condition, though my attempts so far have failed. What is the right way to create a rule that says "anytime someone logs in from the one-time-login page, don't redirect them to the landing page...let them pass to the change password page"??
Any help would be very appreciated.
Comments
Qualification to above
Sorry, the rule that says:
"anytime someone logs in, redirect them to the landing page EXCEPT if they are coming from the one-time-login page"
Have you tried the Login
Have you tried the Login Destination (http://drupal.org/project/login_destination) module? Makes this type of thing very easy to do..
Use PHP condition
Hi,
Add PHP condition (you might need to enable the php core module) and add something along (drupal 7):
// redirect to landing page unless ...
return !(@$_REQUEST['form_id'] == 'user_pass_reset');
Hope it helps
Best,
Ron
How about the first-time login page?
I need to create a rule to distinguish multiple ways of logging in:
First-time login (2 ways of doing it: link in email and copy & paste into login block on homepage) and reset needs to go to the user edit page to reset password.
The form_id for user_pass_reset is one that I can use and I thank you for that.
I need to be able to identify the other cases. How do I find the form_id for:
Thanks
http://groups.drupal.org/node/236478#comment-770558 worked for me