fix error

This commit is contained in:
chiu 2021-02-22 12:09:17 +08:00
parent 1debdda69e
commit 0ba50867e1
1 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ module LdapLogin::Login
ldap = Net::LDAP.new ldap = Net::LDAP.new
ldap.host = ldap_host ldap.host = ldap_host
ldap.port = 389 ldap.port = 389
ldap.auth ldap_user, ldap_pass ldap.auth #{ldap_user}@asia.edu.tw, ldap_pass
if ldap.bind if ldap.bind
puts ['ldap_user',ldap_user,'ldap_pass',ldap_pass] puts ['ldap_user',ldap_user,'ldap_pass',ldap_pass]
if !user.nil? if !user.nil?
@ -41,7 +41,7 @@ module LdapLogin::Login
end end
login_flag = true login_flag = true
else else
error = t('devise.failure.ldap_pass_but_account_not_in_orbit') error = I18n.t('devise.failure.ldap_pass_but_account_not_in_orbit')
end end
else else
error = '驗證失敗,您輸入的使用者名稱或密碼不正確!' error = '驗證失敗,您輸入的使用者名稱或密碼不正確!'