diff --git a/app/models/user.rb b/app/models/user.rb index d28a42eb6..ca8913526 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -406,8 +406,10 @@ class User < ApplicationRecord return '游客' unless logged? name = lastname + firstname - name.blank? ? (nickname.blank? ? login : nickname) : name - name.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs + username = name.blank? ? (nickname.blank? ? login : nickname) : name + Rail.logger.info("3333333332222222#{username}") + username.gsub(/\s+/, '').gsub(/\n/, '').strip #6.11 -hs + end # 用户是否选题毕设课题