Skip to content

Commit 646359b

Browse files
author
Robert Mitwicki
committed
Merge pull request #193 from MorganShowman/sql_authlogic/matching_users
Move logic for matching users into method
2 parents efd533f + 31edfef commit 646359b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/casserver/authenticators/sql_authlogic.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def validate(credentials)
5656
salt_column = @options[:salt_column]
5757

5858
log_connection_pool_size
59-
results = user_model.find(:all, :conditions => ["#{username_column} = ?", @username])
59+
results = matching_users
6060
user_model.connection_pool.checkin(user_model.connection)
6161

6262
begin
@@ -90,4 +90,10 @@ def validate(credentials)
9090
return false
9191
end
9292
end
93+
94+
protected
95+
96+
def matching_users
97+
user_model.find(:all, :conditions => ["#{username_column} = ?", @username])
98+
end
9399
end

0 commit comments

Comments
 (0)