emails: send verification mail when user changes address.
This commit is contained in:
20
app/views/user_mailer/email_change_confirmation.html.erb
Normal file
20
app/views/user_mailer/email_change_confirmation.html.erb
Normal file
@@ -0,0 +1,20 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<body>
|
||||
<h2>Hi <%= @user.name %>,</h2>
|
||||
|
||||
<p>
|
||||
You recently changed your email address on <%= Danbooru.config.app_name %>.
|
||||
Click the link below to verify your new email address.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<%= link_to "Verify email address", verify_user_email_url(@user, email_verification_key: Danbooru::MessageVerifier.new(:email_verification_key).generate(@user.email_address.id)) %>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If you did not recently change your email address on <%= Danbooru.config.app_name %>,
|
||||
you may delete and ignore this email.
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
@@ -27,6 +27,9 @@
|
||||
<p>
|
||||
<% if @user.email_address.present? %>
|
||||
<%= @user.email_address.address %>
|
||||
<% if !@user.email_address.is_verified %>
|
||||
<em>(unverified)</em>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<em>blank</em>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user