Method: Credential.find_using_auth
- Defined in:
- app/models/credential.rb
.find_using_auth(email, password, find_at = Time.now) ⇒ Object
33 34 35 36 37 |
# File 'app/models/credential.rb', line 33 def self.find_using_auth(email, password, find_at = Time.now) credential = Credential.find(:first, :conditions => ['email_address = ?', email]) (credential and credential.accept_password?(password, find_at)) ? credential : nil end |