<% if @user == CurrentUser.user %>
Deactivate Account
<% else %>
Deactivate Account: <%= link_to_user @user %>
<% end %>
You can deactivate your account by entering your password below. Deactivating your account will delete your
private account information, but it will not delete your contributions to the site.
Deactivating your account will do the following things:
- Change your username to a generic username (user_<%= @user.id %>).
- Delete your password, email address, <%= link_to_wiki "API keys", "help:api" %>, and account settings.
- Delete your <%= link_to_wiki "saved searches", "help:saved_searches" %>.
- Delete your <%= link_to_wiki "private favorite groups", "help:favorite_groups" %>.
- Delete your private favorites and upvotes (only if <%= link_to_wiki "privacy mode", "help:privacy_mode" %> is enabled).
The following things will not be deleted:
- Posts you've uploaded.
- Your comments, forum posts, and private messages.
- Your tag edits, wiki edits, translation notes, and any other contributions you've made to the site.
- Your login history, including your IP address and geographic location. This is kept for moderation purposes.
If you just want to change your username, you can <%= link_to "change your name here", change_name_user_path(@user) %>.
Enter your password below to deactivate your account. This cannot be
undone. Your account cannot be recovered after it is deactivated.
<%= edit_form_for(:user, url: user_path(@user), method: :delete) do |f| %>
<%= f.input :password %>
<%= f.submit "Deactivate account", "data-confirm": "Are you sure you want to deactivate your account? This cannot be undone" %>
<% end %>