Commit 4a1ed00a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'ldap_user_creation_fix' of /home/git/repositories/gitlab/gitlab-ee

parents e316324b 9b7174c3
......@@ -86,7 +86,11 @@ module Gitlab
end
def username
auth.info.nickname.to_s.force_encoding("utf-8")
(auth.info.nickname || samaccountname).to_s.force_encoding("utf-8")
end
def samaccountname
(auth.extra[:raw_info][:samaccountname] || []).first
end
def provider
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment