It would be nice to have a rules action to send the password recovery mail provided by Drupal core for a special user.

Maybe sending out all the other user related mail templates given in admin/config/people/accounts would be nice to have as rules actions too? But I don't know if this is really needed...

Comments

chony’s picture

Component: Rules Core » Rules Engine
Issue tags: +actions, +mail, +password reset
StatusFileSize
new8.03 KB

Hi Chris, I just created a new module for your request, since patching Drupal core is the last resort. I made a Rules Mail module that can be extended with further mail actions, like those you mention.

I'll be posting the module to Drupal contrib later on today, but you can take a look at it here in the attached file.

Best Regards!

chony’s picture

StatusFileSize
new973 bytes
new1.01 KB

..or.. you could patch the user.eval.inc and user.rules.inc files in rules\modules directory. I attached the patches here.

Hope it helps.

criz’s picture

Status: Active » Needs review
criz’s picture

Status: Needs review » Needs work

Thx chony! The patches are not working because they are not relative to the module folder. Can you fix this?
Maybe having just one patch file for all your changes would be nice to have too. I am not using netbeans but this should be feasible...

And please have a look again at coding styles (indents, brackets): http://drupal.org/coding-standards

chony’s picture

Status: Needs work » Needs review
StatusFileSize
new1.4 KB

Hi Chris, you are right. Here is the patch as it should be, let me know if you find anything wrong.

Regards.

criz’s picture

Status: Needs review » Needs work

Thx, the patch applied cleanly now.

I have tested the patch and it works fine! Great work!

One thing left: The type of the watchdog message should be the module name. But then it should be done imho.

chony’s picture

StatusFileSize
new1.4 KB

Yeap, here it goes again with that changed.

criz’s picture

Status: Needs work » Needs review

thx chony, ready to review...

fago’s picture

Component: Rules Engine » Rules Core
Status: Needs review » Closed (duplicate)

#1031530: Add a User action "Send account e-mail" has a rather complete and more powerful patch covering this also - please collaborate over there and test the patch.