解决login中带特殊字符的问题
This commit is contained in:
parent
5134418388
commit
ddb747bfcb
|
@ -324,7 +324,7 @@ class User < Principal
|
|||
# id 转换成 登录名
|
||||
# 如果是整数就去ID,否则就取login
|
||||
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
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue