Sha256: c20a75d5828fcfaf88d673d56f73992eefe754e31fbd4271334325ddbd451b0d

Contents?: true

Size: 822 Bytes

Versions: 1

Compression:

Stored size: 822 Bytes

Contents

unless PluginRoutes.static_system_info['user_model'].present?
  class CamaleonCms::User < ActiveRecord::Base
    include CamaleonCms::UserMethods
    self.table_name = PluginRoutes.static_system_info["cama_users_db_table"] || "#{PluginRoutes.static_system_info["db_prefix"]}users"
    # attr_accessible :username, :role, :email, :parent_id, :last_login_at, :site_id, :password, :password_confirmation, :first_name, :last_name #, :profile_attributes
    # attr_accessible :is_valid_email

    default_scope {order("#{CamaleonCms::User.table_name}.role ASC")}
    validates :username, :presence => true
    validates :email, :presence => true, :format => { :with => /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i } #, :unless => Proc.new { |a| a.auth_social.present? }
    has_secure_password #validations: :auth_social.nil?
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
camaleon_cms-2.3.6 app/models/camaleon_cms/user.rb