-
Notifications
You must be signed in to change notification settings - Fork 130
4 new hooks for email and forgotten passwords #4805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also, additional developer logging.
robinsowell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaning strongly toward removing the logging. I tend to think it should be in the extension rather than the core.
Also some concerns about how much this could fill up logs if they're sending emails to member groups and such.
Documenting new hooks related to email address overrides. ExpressionEngine/ExpressionEngine#4805
Get it consistent with the other hooks in that file
system/ee/legacy/libraries/Email.php
Outdated
| { | ||
| // email_from_address allows overriding the from address | ||
| if (ee()->extensions->active_hook('email_from_address')) { | ||
| $from = ee()->extensions->call('email_from_address', $from, $name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we pass $name, do we want the ability to set it as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no reason not to. I'm also not 100% sure why we pass it there, but giving them the extra flexibility seems reasonable. I'll make it so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, my concern was that if they end up changing the email and the name, but then the name is the original name, and the email is the new email, it might send like that.
|
@matthewjohns0n this one is ready for final (hopefully) review. The main changes that are worth a look/thought are - in email library, what do we want to default to if the extension doesn't set something. And- do we want to do end_script on all of the new hooks. I actually thought end_script was uniform across all hooks. As in- if it's a hook, there's an end_script. This does not look to be the case so, I figure it's worth an eyeball. Once approved, I'll tweak docs to match the final product. |
Also, additional developer logging. Docs ExpressionEngine/ExpressionEngine-User-Guide#1021
Proposed hooks:
member_auth_send_reset_token_start
cp_login_send_reset_token_start
email_from_address
email_to_address
Finalized hooks:
member_auth_send_reset_token_start
cp_member_send_reset_token_start
email_from_address
email_to_address