0

I have a redirect rule in place which takes user to home page after login, I need to bypass this rule when a user logs in with one time url login link which is sent in account creation email.

I am assuming there should be condition I need to put in the redirect on user login rule,but I am not finding it.I tried by putting a condition that if the site current page url is account one time login url then rule should not trigger,but its not working as the condition does not satisfy.

0

Got answer for it https://drupal.org/node/480584 #25. In brief the key was text comparison in the current page url to match if user/reset exists.

{ "rules_am_redirect_user_logins" : {
"LABEL" : "AM redirect user logins",
"PLUGIN" : "reaction rule",
"REQUIRES" : [ "rules" ],
"ON" : [ "user_login" ],
"IF" : [
{ "NOT text_matches" : { "text" : [ "site:current-page:path" ], "match" : "user\/reset" } }
],
"DO" : [ { "redirect" : { "url" : "user-home" } } ]
}
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.