Commit 9b7174c3 authored by Jacob Vosmaer's avatar Jacob Vosmaer

Try sAMAccountName is omniauth nickname is nil

parent e316324b
...@@ -86,7 +86,11 @@ module Gitlab ...@@ -86,7 +86,11 @@ module Gitlab
end end
def username 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 end
def provider 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