Skip to content

Commit 873bfbd

Browse files
committed
Fix error: undefined local variable or method `user_model' for CASServer::Authenticators::SQLEncrypted:Class (NameError)
1 parent d297422 commit 873bfbd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

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)