fixed empty name of member list

This commit is contained in:
Rueshyna 2012-12-19 15:28:49 +08:00 committed by chris
parent 83fb5230a4
commit ec1fad9729
2 changed files with 7 additions and 1016 deletions

View File

@ -156,7 +156,13 @@ class User
if info if info
first_name = get_attribute_values.detect {|value| value.key.to_s.eql?('first_name') }[I18n.locale.to_s] rescue nil 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 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 else
return nil return nil
end end

1015
out

File diff suppressed because one or more lines are too long