提交 9e805b77 编写于 作者: C 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`.
上级 3dea71ce
......@@ -65,7 +65,11 @@ module Gitlab
end
def name
auth.info.name.to_s.force_encoding("utf-8")
unless auth.info.name.nil?
auth.info.name.to_s.force_encoding("utf-8")
else
"#{auth.info.first_name} #{auth.info.last_name}".force_encoding("utf-8")
end
end
def username
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册