fix error

This commit is contained in:
chiu 2020-04-10 20:51:27 +08:00
parent 22266ebf09
commit e5db52e0a0
1 changed files with 0 additions and 17 deletions

View File

@ -32,23 +32,6 @@ module LdapLogin::Login
url_method = 'redirect_to' url_method = 'redirect_to'
end end
end end
elsif !resource.nil?
if (resource.authenticate(login_password) && resource.is_confirmed?.eql?(true))
session[:user_id] = resource.id
session[:login_referer] = nil
login_flag = true
if params[:referer_url]
url = URI.parse(params[:referer_url]).path
url_method = 'redirect_to'
else
url = admin_dashboards_path
url_method = 'redirect_to'
end
else
flash.now.alert = t('devise.failure.invalid')
url = "new"
url_method = 'render'
end
else else
puts "==password LDAP fail..." puts "==password LDAP fail..."
flash.now.alert = t('devise.failure.ldap_invalid') flash.now.alert = t('devise.failure.ldap_invalid')