Merged r1442, r1443 and r1446 to r1449 from trunk.

git-svn-id: http://redmine.rubyforge.org/svn/branches/0.7-stable@1450 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-05-25 11:33:04 +00:00
1 parent 729d1176ea
commit 290bd1756d
11 files changed
+63 -7

No files matched your search

+1 -2
View File
@@ -258,13 +258,12 @@ class User < ActiveRecord::Base
end
def self.anonymous
return @anonymous_user if @anonymous_user
anonymous_user = AnonymousUser.find(:first)
if anonymous_user.nil?
anonymous_user = AnonymousUser.create(:lastname => 'Anonymous', :firstname => '', :mail => '', :login => '', :status => 0)
raise 'Unable to create the anonymous user.' if anonymous_user.new_record?
end
@anonymous_user = anonymous_user
anonymous_user
end
private