0
0
Fork 0

Fix #942: Seamless LDAP login (#6556)

This commit is contained in:
Eugen Rochko 2018-02-28 19:04:53 +01:00 committed by GitHub
parent e852872846
commit 47bdb9b33b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 117 additions and 13 deletions

View file

@ -37,7 +37,7 @@ class Auth::SessionsController < Devise::SessionsController
if session[:otp_user_id]
User.find(session[:otp_user_id])
elsif user_params[:email]
if use_pam? && Devise.check_at_sign && user_params[:email].index('@').nil?
if use_seamless_external_login? && Devise.check_at_sign && user_params[:email].index('@').nil?
User.joins(:account).find_by(accounts: { username: user_params[:email] })
else
User.find_for_authentication(email: user_params[:email])