fix error
This commit is contained in:
parent
a2ec4b9334
commit
820ee81cbb
|
@ -1,6 +1,6 @@
|
||||||
module LdapLogin::Login
|
module LdapLogin::Login
|
||||||
LDAP_ADSERVER="https://ap99.mdu.edu.tw/MduDB/api/Auth/token/1"
|
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)
|
def ldap_login_auth(user,request,session,flash,params)
|
||||||
error = ''
|
error = ''
|
||||||
ldap_user = params[:user_name]
|
ldap_user = params[:user_name]
|
||||||
|
@ -21,7 +21,7 @@ module LdapLogin::Login
|
||||||
|
|
||||||
if res.code == '200' && JSON.load(res.body)["userID"]==ldap_user
|
if res.code == '200' && JSON.load(res.body)["userID"]==ldap_user
|
||||||
if !user.nil?
|
if !user.nil?
|
||||||
session[:user_id] = ldap_user
|
session[:user_id] = user.id
|
||||||
session[:login_referer] = nil
|
session[:login_referer] = nil
|
||||||
if params[:referer_url]
|
if params[:referer_url]
|
||||||
url = URI.parse(params[:referer_url]).path
|
url = URI.parse(params[:referer_url]).path
|
||||||
|
|
Loading…
Reference in New Issue