Class: CamaleonCms::User
- Inherits:
-
CamaleonRecord
- Object
- ActiveRecord::Base
- CamaleonRecord
- CamaleonCms::User
- Includes:
- UserMethods
- Defined in:
- app/models/camaleon_cms/user.rb
Constant Summary
Constants inherited from CamaleonRecord
CamaleonRecord::TRANSLATION_TAG_HIDE_MAP, CamaleonRecord::TRANSLATION_TAG_HIDE_REGEX, CamaleonRecord::TRANSLATION_TAG_HIDE_SENTINELS, CamaleonRecord::TRANSLATION_TAG_RESTORE_MAP, CamaleonRecord::TRANSLATION_TAG_RESTORE_REGEX
Class Method Summary collapse
Methods included from UserMethods
#admin?, #assign_site, #cama_reset_auth_token!, #client?, #created, #fullname, #generate_token, #get_role, #posts, #send_confirm_email, #send_password_reset, #sites, #updated
Methods inherited from CamaleonRecord
#ability, #cama_build_cache_key, #cama_fetch_cache, #cama_get_cache, #cama_remove_cache, cama_sanitize_translatable, #cama_set_cache, #can?, #current_site, #current_user, polymorphic_class_for, polymorphic_name, #reset_ability
Class Method Details
.find_by_email(email) ⇒ Object
26 27 28 |
# File 'app/models/camaleon_cms/user.rb', line 26 def self.find_by_email(email) find_by(['lower(email) = ?', email.to_s.downcase]) end |
.find_by_username(username) ⇒ Object
30 31 32 |
# File 'app/models/camaleon_cms/user.rb', line 30 def self.find_by_username(username) find_by(['lower(username) = ?', username.to_s.downcase]) end |