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')