-
-
Notifications
You must be signed in to change notification settings - Fork 436
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
Allow setting admin user notification email receiver #3722
base: main
Are you sure you want to change the base?
Conversation
$emails = $this->getUserCreateAdditionalEmail(); | ||
$emails[] = $generalContactEmail; | ||
// collect general and additional emails unless overridden | ||
if ($receiverEmail && filter_var($receiverEmail, FILTER_VALIDATE_EMAIL)) { |
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.
Zend_Validate::is($receiverEmail, 'EmailAddress')
perhaps?
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.
Yes, because FILTER_VALIDATE_EMAIL
is not used.
@@ -1256,16 +1256,28 @@ | |||
<show_in_website>0</show_in_website> | |||
<show_in_store>0</show_in_store> | |||
</extensions_compatibility_mode> | |||
<crate_admin_user_notification translate="label comment"> | |||
<create_admin_user_notification translate="label 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 would leave the typo as-is. Yes, you move the value to the new setting, but legacy code may still use the old xpath.
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.
For legacy code, this can be used, if I remember correctly:
<crate_admin_user_notification deprecated="true">
<config_path>admin/security/create_admin_user_notification</config_path>
</crate_admin_user_notification>
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.
Where is that @luigifab ?
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.
Here:
magento-lts/app/code/core/Mage/Paypal/etc/system.xml
Lines 29 to 40 in 6ea8cf0
<account translate="label" module="paypal"> | |
<label>Merchant Location</label> | |
<fieldset_css>paypal-config</fieldset_css> | |
<expanded>1</expanded> | |
<sort_order>5</sort_order> | |
<show_in_default>1</show_in_default> | |
<show_in_website>1</show_in_website> | |
<frontend_model>paypal/adminhtml_system_config_fieldset_location</frontend_model> | |
<fields> | |
<merchant_country translate="label comment"> | |
<label>Merchant Country</label> | |
<config_path>paypal/general/merchant_country</config_path> |
<label>New Admin User Create Notification</label> | ||
<comment>This setting enable notification when new admin user created.</comment> | ||
<comment>This setting enables notification when new admin user is created.</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.
This is ok to change.
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.
Before changing the comment, please check if there is a translation for that phrase. If exists you should change only the CSV file.
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.
yep, needs to be changed in Mage_Core.csv instead of here, so that we don't break language packs
@@ -1256,16 +1256,28 @@ | |||
<show_in_website>0</show_in_website> | |||
<show_in_store>0</show_in_store> | |||
</extensions_compatibility_mode> | |||
<crate_admin_user_notification translate="label comment"> | |||
<create_admin_user_notification translate="label 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.
In #3721 was decided not to create a breaking change to fix a typo, let's please address the comments made by other users if possible
Description (*)
This PR allows setting receiver email to "New Admin User Create Notification". Default is that email is sent to store general email address. In some cases it is necessary to allow changing the notification receiver.
Related Pull Requests
Depends on and includes changes from #3721
Fixed Issues (if relevant)
No.
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)