From 6020e0519e20580364374d209420d519181621b2 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 21 Jun 2007 22:50:17 +0000 Subject: [PATCH] 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. --- app/views/layouts/site.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/layouts/site.rhtml b/app/views/layouts/site.rhtml index 54b7af10c..4194e14f7 100644 --- a/app/views/layouts/site.rhtml +++ b/app/views/layouts/site.rhtml @@ -24,7 +24,7 @@ - <% 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};" } %> | -- 2.43.2