diff --git a/app/models/user.rb b/app/models/user.rb index ca8913526..20b60dfcb 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -404,12 +404,9 @@ class User < ApplicationRecord # 用户的真实姓名(不考虑用户是否隐藏了真实姓名,课堂模块都用真实姓名) def real_name return '游客' unless logged? - name = lastname + firstname - username = name.blank? ? (nickname.blank? ? login : nickname) : name - Rail.logger.info("3333333332222222#{username}") - username.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs - + name.blank? ? (nickname.blank? ? login : nickname) : name + gsub(/\s+/, '').strip #6.11 -hs end # 用户是否选题毕设课题