Allow moderators to forcibly change the username of other users. This is so mods can change abusive or invalid usernames. * A mod can only change the username of Builder-level users and below. * The user can't change their own name again until one week has passed. * A modaction is logged when a mod changes a user's name. * A dmail is sent to the user notifying them of the change. * The dmail does not send the user an email notification. This is so we don't spam users if their name is changed after they're banned, or if they haven't visited the site in a long time. The rename button is on the user's profile page, and when you hover over the user's name and open the "..." menu.
41 lines
1.5 KiB
Plaintext
41 lines
1.5 KiB
Plaintext
<div id="c-user-name-change-requests">
|
|
<div id="a-new" class="fixed-width-container">
|
|
<% if CurrentUser.user != @change_request.user %>
|
|
<h1>Change Name: <%= link_to_user @change_request.user %></h1>
|
|
<% else %>
|
|
<h1>Change Name</h1>
|
|
<% end %>
|
|
|
|
<% if CurrentUser.user.name_invalid? %>
|
|
<p> Your current username is invalid. You must change your username to continue
|
|
using <%= Danbooru.config.canonical_app_name %>.</p>
|
|
|
|
<p>
|
|
Current name: <b><%= CurrentUser.user.name %></b>.<br>
|
|
Error: <%= CurrentUser.user.name_errors.full_messages.join(". ").html_safe %>.
|
|
</p>
|
|
<% end %>
|
|
|
|
<div class="prose mt-4 mb-4">
|
|
<h6>Rules</h6>
|
|
<ul>
|
|
<li>Names can contain only letters, numbers, underscore ('_'), period ('.'), and dash ('-') characters.</li>
|
|
<li>Names must start and end with a letter or number.</li>
|
|
<li>Names must be less than 25 characters long.</li>
|
|
<li>Names can't insult or impersonate other users.</li>
|
|
<li>Names are case-insensitive.</li>
|
|
<li>Your previous names will be visible on your profile to other Danbooru members, but they won't be visible to search engines.</li>
|
|
<li>You can't change your name more than once per week.</li>
|
|
</ul>
|
|
</div>
|
|
|
|
<%= edit_form_for(@change_request) do |f| %>
|
|
<%= f.input :user_id, as: :hidden, input_html: { value: @change_request.user_id } %>
|
|
<%= f.input :desired_name, label: "New name" %>
|
|
<%= f.submit "Submit" %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
|
|
<%= render "secondary_links" %>
|