fixed empty name of member list

This commit is contained in:
Rueshyna authored and chris committed 2012-12-19 19:48:13 +08:00
1 parent 83fb5230a4
commit ec1fad9729
2 files changed
+7 -1016

No files matched your search

+7 -1
View File
@@ -156,7 +156,13 @@ class User
if info
first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil
last_name = get_attribute_values.detect {|value| value.key.to_s.eql?('last_name') }[I18n.locale.to_s] rescue nil
return "#{last_name} #{first_name}"
full_name = "#{last_name} #{first_name}"
if full_name.strip.empty?
full_name = email
end
return full_name
else
return nil
end