<% if @user.identities.find_by(provider:'github').nil? %>
CONNECT GITHUB ACCOUNT
<% end %> <% if @user.identities.find_by(provider:'twitter').nil? %>
<%= ApplicationConfig["APP_DOMAIN"] %>/users/auth/twitter/callback" class="big-button cta" data-no-instant> CONNECT TWITTER ACCOUNT
<% end %>

Danger Zone

<% if @user.identities.count == 2 %>

Remove OAuth Associations

You can remove one of your authentication methods. We'll still need one to authenticate you.

Removing an OAuth association will: Note that this does not revoke our OAuth app access; you will have to do so in your Twitter profile settings or your GitHub profile settings.

<%= form_tag "/users/remove_association", method: :delete, onsubmit: "return confirm('Are you absolutely sure you want to remove your Twitter account?');" do %> <%= hidden_field_tag :provider, "twitter" %> <% end %>
<%= form_tag "/users/remove_association", method: :delete, onsubmit: "return confirm('Are you absolutely sure you want to remove your GitHub account?');" do %> <%= hidden_field_tag :provider, "github" %> <% end %>

<% end %> <% if @user.articles_count.zero? && @user.comments_count.zero? %>

Delete Account

<%= form_tag "/users/destroy", method: :delete, autocomplete: "off" do %> Deleting your account will: To delete your account, type in your username:
For verification, type the words: delete my account
<% end %>


<% end %>

Request Account Deletion


Click this link to request account deletion via email. This includes all articles, comments, reactions, etc. as well as any personal information you have.

Be sure to change the email template to fit your needs.