Signed-off-by: alan <547533434@qq.com>
This commit is contained in:
alan 2014-11-23 11:48:59 +08:00
parent 6963d494ae
commit 4221f5edb3
1 changed files with 1 additions and 1 deletions

View File

@ -124,7 +124,7 @@ class ApplicationController < ActionController::Base
else
# HTTP Basic, either username/password or API key/random
authenticate_with_http_basic do |username, password|
user = User.try_to_login(username, password)[0] || User.find_by_api_key(username)
user = User.try_to_login(username, password) || User.find_by_api_key(username)
end
end
# Switch user if requested by an admin user