From 820ee81cbbfde153896615bb2830ff897817b040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Tue, 25 Jan 2022 11:51:28 +0800 Subject: [PATCH] fix error --- lib/ldap_login/login.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ldap_login/login.rb b/lib/ldap_login/login.rb index 4fe6f79..dbc4ae3 100644 --- a/lib/ldap_login/login.rb +++ b/lib/ldap_login/login.rb @@ -1,6 +1,6 @@ module LdapLogin::Login LDAP_ADSERVER="https://ap99.mdu.edu.tw/MduDB/api/Auth/token/1" - AppKey = "YhoRop0YmL6" + AppKey = "OCz3t1nQWD" def ldap_login_auth(user,request,session,flash,params) error = '' ldap_user = params[:user_name] @@ -21,7 +21,7 @@ module LdapLogin::Login if res.code == '200' && JSON.load(res.body)["userID"]==ldap_user if !user.nil? - session[:user_id] = ldap_user + session[:user_id] = user.id session[:login_referer] = nil if params[:referer_url] url = URI.parse(params[:referer_url]).path