Skip to content

Commit dcccac5

Browse files
committed
Add email support to old auth.txt
1 parent b1f9846 commit dcccac5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/controllers/auths_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def show
2727
end
2828

2929
user = User.find_by(login: params[:username])
30+
user ||= User.find_by('lower(email) = ?', params[:username].downcase)
3031
msg = if user && params[:password].present? && user.has_password?(params[:password])
3132
OK_MESSAGE
3233
else

0 commit comments

Comments
 (0)