<% if user %>
  <% if !user.thredded_anonymous? %>
    <% user_path = user_path(user) %>
    <% if user_path.blank? %>
      <span class='thredded--username'><%= user.thredded_display_name %></span>
    <% else %>
      <a href="<%= user_path %>"><%= user.thredded_display_name %></a>
      <%= render partial: 'thredded/users/badge', locals: { user: user } %>
    <% end %>
  <% else %>
    <%= user.thredded_display_name %>
  <% end %>
<% else %>
  <em><%= t 'thredded.null_user_name' %></em>
<% end %>
