Skip to content

Commit

Permalink
Merge pull request #224 from korun/master
Browse files Browse the repository at this point in the history
Fix error: undefined local variable or method `user_model' for CASServer...
  • Loading branch information
mitfik committed Sep 15, 2014
2 parents d297422 + 873bfbd commit 73b89bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/casserver/authenticators/sql_encrypted.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ def generate_encryption_salt

def self.setup(options)
super(options)
user_model.__send__(:include, EncryptedPassword)
user_models.each { |auth_index, model| model.__send__(:include, EncryptedPassword) }
end

def validate(credentials)
read_standard_credentials(credentials)
raise_if_not_configured

user_model = self.class.user_model
user_model = self.user_model

username_column = @options[:username_column] || "username"
encrypt_function = @options[:encrypt_function] || 'user.encrypted_password == Digest::SHA256.hexdigest("#{user.encryption_salt}::#{@password}")'
Expand Down

0 comments on commit 73b89bb

Please sign in to comment.