parent
0d46c63c54
commit
acb41158e7
|
@ -525,7 +525,7 @@ class ApplicationController < ActionController::Base
|
||||||
#
|
#
|
||||||
# @return [boolean, string] name of the layout to use or false for no layout
|
# @return [boolean, string] name of the layout to use or false for no layout
|
||||||
def use_layout
|
def use_layout
|
||||||
request.xhr? ? false : 'base'
|
request.xhr? ? false : 'users_base'
|
||||||
end
|
end
|
||||||
|
|
||||||
def invalid_authenticity_token
|
def invalid_authenticity_token
|
||||||
|
|
|
@ -324,7 +324,7 @@ class User < Principal
|
||||||
# Returns the user that matches provided login and password, or nil
|
# Returns the user that matches provided login and password, or nil
|
||||||
#登录,返回用户名与密码匹配的用户
|
#登录,返回用户名与密码匹配的用户
|
||||||
def self.try_to_login(login, password)
|
def self.try_to_login(login, password)
|
||||||
login = login.to_s
|
login = login.to_s.lstrip.rstrip
|
||||||
password = password.to_s
|
password = password.to_s
|
||||||
|
|
||||||
# Make sure no one can sign in with an empty login or password
|
# Make sure no one can sign in with an empty login or password
|
||||||
|
|
Loading…
Reference in New Issue