Skip to content

Commit

Permalink
Merge pull request #6400 from magento-l3/PR30NovemberVRAD
Browse files Browse the repository at this point in the history
L3 Bugfix delivery vrad
  • Loading branch information
dhorytskyi authored Dec 9, 2020
2 parents e6e5c73 + c0f23b5 commit 47a87d2
Show file tree
Hide file tree
Showing 4 changed files with 159 additions and 55 deletions.
5 changes: 5 additions & 0 deletions app/code/Magento/User/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
<comment>Email template chosen based on theme fallback when "Default" option is selected.</comment>
<source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
</field>
<field id="new_user_notification_template" translate="label comment" type="select" sortOrder="50" showInDefault="1" canRestore="1">
<label>New User Notification Template</label>
<comment>Email template chosen based on theme fallback when "Default" option is selected.</comment>
<source_model>Magento\Config\Model\Config\Source\Email\Template</source_model>
</field>
</group>
<group id="security">
<field id="lockout_failures" translate="label comment" sortOrder="100" showInDefault="1" canRestore="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
* See COPYING.txt for license details.
*/
-->
<!--@subject {{trans "New admin user '%user_name' created" user_name=$user.name}} @-->
<!--@subject {{trans "New admin user '%user_name' created" user_name=$user.username}} @-->
<!--@vars {
"var store.frontend_name":"Store Name",
"var user.name":"User Name",
"var user.first_name":"User First Name",
"var user.last_name":"User Last Name",
"var user.username":"User Name",
"var user.firstname":"User First Name",
"var user.lastname":"User Last Name",
"var user.email":"User Email",
"var store_email":"Store Email",
"var store_phone":"Store Phone"
} @-->

{{trans "Hello,"}}

{{trans "A new admin account was created for %first_name, %last_name using %email." first_name=$user.first_name last_name=$user.last_name email=$user.email}}
{{trans "A new admin account was created for %first_name, %last_name using %email." first_name=$user.firstname last_name=$user.lastname email=$user.email}}
{{trans "If you have not authorized this action, please contact us immediately at %store_email" store_email=$store_email |escape}}{{depend store_phone}} {{trans "or call us at %store_phone" store_phone=$store_phone |escape}}{{/depend}}.

{{trans "Thanks,"}}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/

$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
/** @var \Magento\Email\Model\Template $template */
$template = $objectManager->create(\Magento\Email\Model\Template::class);
$template->setOptions(['area' => 'test area', 'store' => 1]);
$templateText = '{{trans "New User Notification Custom Text %first_name, ' .
'%last_name" first_name=$user.firstname last_name=$user.lastname}}';
$template->setData(
[
'template_text' => $templateText,
'template_code' => 'New User Notification Custom Code',
'template_type' => \Magento\Email\Model\Template::TYPE_TEXT,
'orig_template_code' => 'admin_emails_new_user_notification_template'
]
);
$template->save();
Loading

0 comments on commit 47a87d2

Please sign in to comment.