engines/adva_user/vendor/plugins/authentication/lib/authentication/salted_hash.rb
def authenticate(user, password)
      return false unless valid_model?(user)

      password_hash = hash_string password, user.password_salt
      conditions = ['id = ? AND password_hash = ?', user.id, password_hash]
      conditions[0] << ' AND verified_at IS NOT NULL' if user.respond_to? :verified_at
      0 < user.class.count(:conditions => conditions)
    end
# Carries out actual authentication procedure. If the password
# given is correct for the given user then true is returned.
# Otherwise false will be returned.
Carries out actual authentication procedure. If the password
given is correct for the given user then true is returned.
Otherwise false will be returned.
Carries out actual authentication procedure . If the password given is correct for the given user then true is returned . Otherwise false will be returned .
def authenticate(user, password)
      return false unless valid_model?(user)
      password_hash = hash_string password, user.password_salt
      conditions = ['id = ? AND password_hash = ?', user.id, password_hash]
      conditions[0] << ' AND verified_at IS NOT NULL' if user.respond_to? :verified_at
      0 < user.class.count(:conditions => conditions)
    end
def authenticate ( user , password ) return false unless valid_model? ( user ) password_hash = hash_string password , user . password_salt conditions = [ 'id = ? AND password_hash = ?' , user . id , password_hash ] conditions [ 0 ] << ' AND verified_at IS NOT NULL' if user . respond_to? :verified_at 0 < user . class . count ( :conditions => conditions ) end
Carries out actual authentication procedure.
Carries out actual authentication procedure .
user
password