How to disable / edit the "confirm your email address" inform message
Hi all, I have implemented a signup/signin feature outside of Vanilla (so that users only need to log in on the main website) and confirming their emails is handled by that also. As such, I need to edit (or replace) the message that appears in Vanilla prompting the user to confirm their email address as the link needs points to the main website, not Vanilla.
I can see that the message is created in DashboardHooks::Base_Render_Before
and depends on an attribute EmailKey
set against the user.
Should I simply delete this attribute, and then create a plugin which will display my own custom message, or is there a better way of doing it?
Many thanks
Best Answer
-
vrijvlinder MVP
Have you tried just changing the definitions to edit the email content? Look inside locale en-CA definitions.php and copy the ones you want to edit to a custom new locale file
$Definition['EmailConfirmEmail'] = 'You need to confirm your email address before you can continue. Please confirm your email address by clicking on the following link: {/entry/emailconfirm,exurl,domain}/{User.UserID,rawurlencode}/{EmailKey,rawurlencode}'; $Definition['EmailWelcomeRegister'] = 'You have successfully registered for an account at {Title}. Here is your information: Username: {User.Name} Email: {User.Email} You can access the site at {/,exurl,domain}.';
1
Answers
You should be able to uncheck the "Require users to confirm their email addresses (recommended)" checkbox in http://forums.example.com/dashboard/settings/registration
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.
I noticed that, but i still want the users to be restricted to what they can do, until they confirm their emails on the main website. Also, i still want a message to appear in vanilla reminding them, but customised to point to the main website.
I've ended up doing this, but is it good practice?
EmailKey
attribute after registering them via the main website -$UserModel->SaveAttribute($UserID, "EmailKey", NULL);
thereby preventing Vanilla displaying it's own message.Initialize
event in Vanilla, to display my own custom message, like so..Have you tried just changing the definitions to edit the email content? Look inside locale en-CA definitions.php and copy the ones you want to edit to a custom new locale file
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌