From e5db52e0a0bb9a595ae2ba9571e5fe9528ab5b9a Mon Sep 17 00:00:00 2001 From: chiu Date: Fri, 10 Apr 2020 20:51:27 +0800 Subject: [PATCH] fix error --- lib/ldap_login/login.rb | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/lib/ldap_login/login.rb b/lib/ldap_login/login.rb index e6e4aee..3a1a78b 100644 --- a/lib/ldap_login/login.rb +++ b/lib/ldap_login/login.rb @@ -32,23 +32,6 @@ module LdapLogin::Login url_method = 'redirect_to' 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 puts "==password LDAP fail..." flash.now.alert = t('devise.failure.ldap_invalid')