Only try to show the logged-in email address if we are actually logged in.

This commit is contained in:
Roland 2011-10-02 23:49:50 +02:00
parent f2870c1d10
commit 155663ba5e

View file

@ -29,8 +29,12 @@
<div class="onecol header_actions"><%= link_to "Geb", birthdays_path %></div>
<div class="onecol header_actions"><%= link_to "Neu", new_contact_path %></div>
<div class="threecol omega header_email">
<%= current_user.email %>
(<%= link_to t('sessions.actions.logout'), destroy_user_session_path %>)
<% if current_user.nil? %>
&nbsp;
<% else %>
<%= current_user.email %>
(<%= link_to t('sessions.actions.logout'), destroy_user_session_path %>)
<% end %>
</div>
</div> <%# row %>