module Outpost::Model::Authentication::ClassMethods

Public Instance Methods

authenticate(login, unencrypted_password) click to toggle source
# File lib/outpost/model/authentication.rb, line 18
def authenticate(login, unencrypted_password)
  if user = self.send(
  "find_by_#{Outpost.config.authentication_attribute}", login)
    user.authenticate(unencrypted_password)
  else
    false
  end
end