lastname为空时也可以加,可以省掉查询extensions的语句
This commit is contained in:
parent
3476731b83
commit
91b245ad2c
|
@ -399,16 +399,7 @@ class User < Principal
|
|||
end
|
||||
|
||||
def show_name
|
||||
name = ""
|
||||
unless self.user_extensions.nil?
|
||||
if self.user_extensions.identity == 2
|
||||
name = firstname
|
||||
else
|
||||
name = lastname+firstname
|
||||
end
|
||||
else
|
||||
name = lastname+firstname
|
||||
end
|
||||
name = lastname + firstname
|
||||
name.empty? || name.nil? ? login : name
|
||||
end
|
||||
## end
|
||||
|
|
Loading…
Reference in New Issue