Commit 9e805b77 authored by C. Morgan Hamill's avatar C. Morgan Hamill

Provide fallback for missing `name` value.

If `auth.info.name` is `nil`, then use `auth.info.first_name + auth.info.last_name`
as the value of `name`.
parent 3dea71ce
...@@ -65,7 +65,11 @@ module Gitlab ...@@ -65,7 +65,11 @@ module Gitlab
end end
def name def name
unless auth.info.name.nil?
auth.info.name.to_s.force_encoding("utf-8") auth.info.name.to_s.force_encoding("utf-8")
else
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding("utf-8")
end
end end
def username 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