3

I have a rule for user-login that redirects them to their content area and shows a welcome message with some instructions. But when a user uses the password recovery mechanism that rule should not fire. I have tried "path has URL alias" and "user/reset/*" as value. But it did not work. I can't figure out what else i could use.

Reason is: users need their current password, which they don't know, when they are going manually to their user/n/edit page. When the rule wouldn't fire they'd be redirected to the correct password reset page without the current password requirement.

Thanks!

1 Answer 1

3

You may want to give this a try:

  • Rules Event: User has logged in.
  • Rules Condition: Text Comparison with
    • Text Data Selector = site:current-page:path
    • Matching Text = reset
    • Comparison Operator = contains
  • Rules Action(s): whatever makes sense.

I'm not 100% sure about the value of the "Matching Text" (if it's not reset, then adapt that value to something that fits for these kinds of one time login URLs).

2
  • 1
    Thanks a lot! Worked like a charm. Rules is so powerful, but one needs to get used to it, especially if it's not used on a daily basis.
    – Volker
    Commented Aug 9, 2017 at 12:18
  • 1
    @Volker Merci for accept and +1 ... I fully agree with your comment (there are not many business logic cases where I can't get it done using some kind of custom rule). Just in case you do want to get used to it, and whenever you have time: have a look at some (or all?) of these answers ... Then ask yourself "so what is it that you cannot do with Rules?" ... Commented Aug 9, 2017 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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