diff --git a/app/models/user.rb b/app/models/user.rb index 85653feef..d6e4eb715 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -323,8 +323,9 @@ class User < Principal # id 转换成 登录名 # 如果是整数就去ID,否则就取login + # 含有特殊符号的则显示ID def to_param - self.login.to_i.to_s == self.login ? id : login + (self.login.to_i.to_s == self.login || self.login.include?(".") || self.login.include?("%") || self.login.include?("?")) ? id : login end