提交 93505f7d 编写于 作者: J Jan-Willem van der Meer

DRY find method to find Gitlab user

上级 410d6e30
......@@ -29,10 +29,8 @@ module Gitlab
end
def find_by_uid_and_provider
# LDAP distinguished name is case-insensitive
model.
where(provider: [auth_hash.provider, :ldap]).
where('lower(extern_uid) = ?', auth_hash.uid.downcase).last
self.class.find_by_uid_and_provider(
auth_hash.provider, auth_hash.uid.downcase)
end
def find_by_email
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册