超级管理员的试用申请显示信息有点问题

This commit is contained in:
cxt 2017-09-06 15:32:54 +08:00
parent 5f4893d0ab
commit 0cb964b237
1 changed files with 5 additions and 3 deletions

View File

@ -574,10 +574,12 @@ class User < Principal
def identity
ue = self.user_extensions
unless ue.blank?
if ue.technical_title.blank?
ue.identity == 0 ? "老师" : (ue.identity == 1 ? "学生" : "专业人士")
if ue.identity == 0
result = ue.technical_title ? ue.technical_title : "老师"
elsif ue.identity == 1
result = "学生"
else
result = ue.technical_title
result = ue.technical_title ? ue.technical_title : "专业人士"
end
end
end