Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Why does {User.Name} work in $Definition['EmailHeader'] but not in $Definition['EmailWelcome']?
ttchopper
New
I'm trying to customise the welcome email that gets sent when I create a users account manually. All user accounts are for teachers, so I want the Email header to say "Hello Teacher" or similar and the username to be grouped with the email/password/URL information in the email body.
I tried just moving the {User.Name} value from the EmailHeader definition to the EmailWelcome (firstly in the conf/locale.php, but when that didn't work I also tried in applications/dashboard/locale/en-CA/definitions.php). However it doesn't work. The email body just shows: "Username: {User.Name}"
Is there anyway to do what I want? If so, how?
0
Comments
Welcome to the community!
What version number of Vanilla are you running?
It has to do with the way the string is processed. Use
%1$s
as the username in$Definition['EmailWelcome'];
.All customized definitions should be placed in the
/conf/locale.php
file as it a) has priority on translations and b) is not overwritten on upgrade.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
Thanks for the quick reply. I'm using Version 2.0.18.8.
The reason I tried locale.php first was for the reasons you listed above, but when it didn't work, I was stumped as to why, that's why I tried editing the definitions.php file as well.
I just tested the variable %1s and it works. Thanks so much!