<% title @user.name %>
<% if @user.is?(current_user) || (mod? && current_user.role >= @user.role) %>
<%= link_to "edit profile", edit_user_path(@user), :class => "btn blue" %>
<% end %>
<% if !session[:original_user_id] && admin? %> <%= link_to "become this user", become_path(user: @user), :class => "btn blue" %> <% elsif session[:original_user_id] %> <%= link_to "revert", revert_path, :class => "btn blue" %> <% end %>

<%= @user.name %>

<% if @ban_json && (@ban_json["expires"] == "forever" || !(DateTime.parse(@ban_json["expires"]) <= DateTime.now)) %> This user is banned on the server for "<%=@ban_json["reason"]%>"<%=" until #{@ban_json["expires"]}" unless @ban_json["expires"] == "forever"%> <% end %> <% if @user.banned? %> This user is banned on the website! <% end %>
<% if !@user.confirmed? %> <% if @user.is?(current_user) || mod? %> Please confirm your email <%= @user.email %> ! <%= button_to "Resend the confirmation mail", resend_mail_user_path, class: "btn blue", form_class: "inline-block", data: {confirm: "Did you check your spam folder?"} %> <% else %> This user hasn't confirmed their email yet! <% end %> <% elsif @user.disabled? %> <% if @user.is?(current_user) %> Your account has been disabled. <% else %> This account has been disabled. <% end %> <% end %> <%= @user.avatar(128, class: "user-avatar avatar") %> <%= render partial: "users/username", locals: {user: @user} %> <% if current_user && !@user.discord.blank? %> <% end %> <% if !@user.youtube.blank? && !@user.youtube_channelname.blank? %> <% end %> <% if !@user.twitter.blank? %> <% end %> <% if mod? || @user.is?(current_user) %> <% end %>
IGN <%= @user.ign %>
UUID <%= @user.uuid %>
Role <%= link_to @user.role, users_path(:role => @user.role.name) %>
Discord <%= @user.discord %>
YouTube <% if @user.youtube.length == 24 && @user.youtube[0..1] == "UC" %> <%= link_to @user.youtube_channelname, "https://youtube.com/channel/#{CGI.escape(@user.youtube)}", :target => "_blank" %> <% else %> <%= link_to @user.youtube_channelname, "https://youtube.com/user/#{CGI.escape(@user.youtube)}", :target => "_blank" %> <% end %>
Twitter <%= link_to "@#{@user.twitter}", "https://twitter.com/#{CGI.escape(@user.twitter)}", :target => "_blank" %>
Joined <%= ago @user.created_at %>
Last seen <% if @user.last_seen %> <%= ago @user.last_seen %> <% else %> Never <% end %>
Last IP <%= @user.last_ip %>
Email <%= mail_to @user.email, @user.email, :subject => "Redstoner" %>
About:
<% if @user.about.blank? %> nothing <% else %> <%= render_md(@user.about).html_safe %> <% end %>