summaryrefslogtreecommitdiffstats
path: root/app/models/user.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb51
1 files changed, 0 insertions, 51 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index cb0ad9e3a..681829265 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -999,54 +999,3 @@ class User < Principal
end
end
end
-
-class AnonymousUser < User
- validate :validate_anonymous_uniqueness, :on => :create
-
- self.valid_statuses = [STATUS_ANONYMOUS]
-
- def validate_anonymous_uniqueness
- # There should be only one AnonymousUser in the database
- errors.add :base, 'An anonymous user already exists.' if AnonymousUser.unscoped.exists?
- end
-
- def available_custom_fields
- []
- end
-
- # Overrides a few properties
- def logged?; false end
- def admin; false end
- def name(*args); I18n.t(:label_user_anonymous) end
- def mail=(*args); nil end
- def mail; nil end
- def time_zone; nil end
- def rss_key; nil end
-
- def pref
- UserPreference.new(:user => self)
- end
-
- # Returns the user's bult-in role
- def builtin_role
- @builtin_role ||= Role.anonymous
- end
-
- def membership(*args)
- nil
- end
-
- def member_of?(*args)
- false
- end
-
- # Anonymous user can not be destroyed
- def destroy
- false
- end
-
- protected
-
- def instantiate_email_address
- end
-end