diff --git a/lib/ldap_login/login.rb b/lib/ldap_login/login.rb index 1a14b91..39b8c8f 100644 --- a/lib/ldap_login/login.rb +++ b/lib/ldap_login/login.rb @@ -13,7 +13,7 @@ module LdapLogin::Login ldap = Net::LDAP.new ldap.host = ldap_host ldap.port = 389 - ldap.auth ldap_user, ldap_pass + ldap.auth #{ldap_user}@asia.edu.tw, ldap_pass if ldap.bind puts ['ldap_user',ldap_user,'ldap_pass',ldap_pass] if !user.nil? @@ -41,7 +41,7 @@ module LdapLogin::Login end login_flag = true 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 else error = '驗證失敗,您輸入的使用者名稱或密碼不正確!'