git-svn-id: http://svn.redmine.org/redmine/branches/3.3-stable@16562
e93f8b46-1217-0410-a6f0-
8f06a7374b81
# Login request and validation
def login
- if request.get?
+ if request.post?
+ authenticate_user
+ else
if User.current.logged?
redirect_back_or_default home_url, :referer => true
end
- else
- authenticate_user
end
rescue AuthSourceException => e
logger.error "An error occured when authenticating #{params[:username]}: #{e.message}"
# User self-registration
def register
(redirect_to(home_url); return) unless Setting.self_registration? || session[:auth_source_registration]
- if request.get?
+ if !request.post?
session[:auth_source_registration] = nil
@user = User.new(:language => current_language.to_s)
else