From 776fd0de66f7e9224d8c262585695c0f3ceea582 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Wed, 25 Jul 2018 11:47:09 +0100 Subject: [PATCH] FIX: Filter open-id logins by identifier --- lib/auth/open_id_authenticator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/open_id_authenticator.rb b/lib/auth/open_id_authenticator.rb index a51aac840d6..f4cfbd011e5 100644 --- a/lib/auth/open_id_authenticator.rb +++ b/lib/auth/open_id_authenticator.rb @@ -14,7 +14,7 @@ class Auth::OpenIdAuthenticator < Auth::Authenticator end def description_for_user(user) - info = UserOpenId.find_by(user_id: user.id) + info = UserOpenId.where("url LIKE ?", "#{@identifier}%").find_by(user_id: user.id) info&.email || "" end