Redirect to front page on login and when login through one-time-login-url don't redirect to front page
We can do this by Rules in Drupal
Here is my rules exported code
{ "rules_smr_redirect_user_logins" : {
"LABEL" : "SMR redirect user logins",
"PLUGIN" : "reaction rule",
"OWNER" : "rules",
"REQUIRES" : [ "rules" ],
"ON" : { "user_login" : [] },
"IF" : [
{ "NOT text_matches" : { "text" : [ "site:current-page:path" ], "match" : "user\/reset" } }
],
"DO" : [ { "redirect" : { "url" : "[site:url]" } } ]
}
}
After importing this rule you can change redirect url as per choice.
Comments
Post a Comment