is there a hook when a member uses the forget password feature?

Looking at the hooks documentation, I don't see any hook in there that might do this.

  • The short answer is no. What do you need to trigger when the user resets their password? – Ian Apr 15 '14 at 8:17
  • I wanted to basically override the email being sent so that I can style it as I see fit. – developarvin Apr 15 '14 at 8:46

There are no ExpressionEngine hooks for the forgot password feature but given that you intention is to override the email being sent when a user forgets their password you mainly just need to change that template. The default styling can be changed in:

Design > Message Pages > Email Notifications.

Alternatively Postmaster provides a nice abstraction to work with. It's a commercial addon but is quite versatile. Postmaster provides it's own send system email hook to use.

"This hook will send an email anytime a system email is sent. This hook is great for globally overriding all system emails so you can send them with your preferred service."

This can be used to override any of the default settings and you can even send multiple emails to different recipients if you wanted.

Failing that Custom System Messages is another commercial addon which can do the job as the name suggests. The advantages include the ability to parse other EE template tags and save the Message Pages to files on the filesystem (so you don't have to edit via the Control Panel).

Lastly Libraree is another similar commercial addon (and a personal favourite) providing much the same thing in allowing you to save Speciality Templates to the filesystem and parse other EE template tags. The advantage with this one is that it also saves snippets and global variables as files too.

"Plus, it provides the ability to quickly style notification emails into beautiful HTML emails and style all system messages into proper designed templates."

So there are a number of ways to change the default email message templates being sent along with much cleaner ways to edit them. It's all down to preference. :)

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.