microweber icon indicating copy to clipboard operation
microweber copied to clipboard

New user registration email template

Open Ezyweb-uk opened this issue 5 years ago • 5 comments

The function register_email_send in file src\Microweber\Providers\UserManager.php replaces various short codes with user data eg username, and the replace function replaces eg {username} with the user's name. However in the email template the E-mail values button adds field names/shortcodes enclosed in double curly bracket eg {{username}} so the test email delivered contains {Name} ie with one set of curly brackets remaining. Should there be one set or two sets of curly brackets? I assume just the one (it's not a field in a Symphony template).

Ezyweb-uk avatar Aug 14 '20 17:08 Ezyweb-uk

Why are double curly brackets used to wrap around fields in function get_mail_template_fields in file userfiles\modules\admin\mail_templates\functions.php, because it breaks the field search and replacement in function register_email_send in file src\Microweber\Providers\UserManager.php which replaces single curly brackets?

Ezyweb-uk avatar Aug 27 '20 16:08 Ezyweb-uk

@peter-mw I saw the repository changed so impossible to merge. By the way I re-wrote the code of new registration email and the reset password. @Ezyweb-uk should be fixed the problem with brackets too let me know. src.zip

daebak74 avatar Sep 01 '20 07:09 daebak74

Fixed in v1.2

Ezyweb-uk avatar Dec 17 '20 18:12 Ezyweb-uk

Still exists in 1.2.1 dev https://github.com/microweber/microweber/blob/b4932edd3d707c4a6c3659e740a601a07003fa0e/userfiles/modules/admin/mail_templates/functions.php#L59

Ezyweb-uk avatar Feb 05 '21 13:02 Ezyweb-uk

Issue re-introduced in version 1.2.2 - function get_mail_template_fields in file userfiles\modules\admin\mail_templates\functions.php with double curly brackets is not compatible with function register_email_send in file src\MicroweberPackages\User\UserManager.php line 948 which replaces a single curly brackets, so one set of curly brackets remain after the field merge.

Ezyweb-uk avatar Mar 17 '21 15:03 Ezyweb-uk