Commit 32875f9a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge pull request #6937 from chamill/master

Provide fallback for missing `name` value.
parents 8c1201ef 04561011
......@@ -65,7 +65,11 @@ module Gitlab
end
def name
auth.info.name.to_s.force_encoding("utf-8")
if auth.info.name.nil?
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding('utf-8')
else
auth.info.name.to_s.force_encoding('utf-8')
end
end
def username
......
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