Files
danbooru/app/views/emails/edit.html.erb
evazion 24ead500f0 users: use sudo mode when changing email addresses.
When a user tries to change their email, redirect them to the confirm
password page (like Github's sudo mode) instead of having them re-enter
their password on the change email page. This is the same thing we do
when a user updates their API keys. This way we have can use the same
confirm password authentication flow for everything that needs a
password.
2021-05-19 01:10:03 -05:00

24 lines
889 B
Plaintext

<div id="c-emails">
<div id="a-edit" class="fixed-width-container">
<% page_title "Change Email" %>
<h1>Change Email</h1>
<% if @user.email_address.present? %>
<p>Your current email address is <strong><%= @user.email_address.address %></strong>.
<% end %>
<% if @user.is_restricted? %>
<p>Your account is restricted because you signed up from a proxy or VPN.
You can still use the site, but you won't be able to leave comments, edit
tags, or upload posts until you add a verified email address to your
account. Disposable or throwaway email addresses can't be used to verify
your account.</p>
<% end %>
<%= edit_form_for(@user, url: user_email_path(@user)) do |f| %>
<%= f.input :email, as: :email, input_html: { value: @user&.email_address&.address } %>
<%= f.submit "Save" %>
<% end %>
</div>
</div>