Module: Clearance::User::ClassMethods

Defined in:
lib/clearance/user.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(email, password) ⇒ Object



108
109
110
111
# File 'lib/clearance/user.rb', line 108

def authenticate(email, password)
  return nil  unless user = find_by_email(email)
  return user if     user.authenticated?(password)
end