Skip to content

Commit 73b89bb

Browse files
author
Robert Mitwicki
committed
Merge pull request #224 from korun/master
Fix error: undefined local variable or method `user_model' for CASServer...
2 parents d297422 + 873bfbd commit 73b89bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/casserver/authenticators/sql_encrypted.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ def generate_encryption_salt
4040

4141
def self.setup(options)
4242
super(options)
43-
user_model.__send__(:include, EncryptedPassword)
43+
user_models.each { |auth_index, model| model.__send__(:include, EncryptedPassword) }
4444
end
4545

4646
def validate(credentials)
4747
read_standard_credentials(credentials)
4848
raise_if_not_configured
4949

50-
user_model = self.class.user_model
50+
user_model = self.user_model
5151

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

0 commit comments

Comments
 (0)