Only treat a user as logged in if the user object has an id value - this
avoids problem when creating an account fails and leaves an unsaved user object with no id value.
This commit is contained in:
parent
8284352436
commit
6020e0519e
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
|
||||
<span id="greeting">
|
||||
<% if @user %>
|
||||
<% if @user and @user.id %>
|
||||
Welcome, <%= link_to @user.display_name, {:controller => 'user', :action => 'view', :display_name => @user.display_name}%> |
|
||||
<% @inbox_weight = 'bold' if @user.get_new_messages.length > 0 %>
|
||||
<%= link_to "inbox (#{@user.get_new_messages.length})", {:controller => 'message', :action => 'inbox', :display_name => @user.display_name}, {:style => "font-weight: #{@inbox_weight};" } %> |
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue