remove puts
This commit is contained in:
parent
7f31d0c76f
commit
fb9d4eef0b
|
@ -17,21 +17,20 @@ module LdapLogin::Login
|
||||||
ldap.port = 389
|
ldap.port = 389
|
||||||
ldap.auth "#{ldap_user}@asia.edu.tw", 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]
|
|
||||||
if !user.nil?
|
if !user.nil?
|
||||||
filter = Net::LDAP::Filter.eq( "sAMAccountName", ldap_user )
|
#filter = Net::LDAP::Filter.eq( "sAMAccountName", ldap_user )
|
||||||
treebase = "ou=Asia Univ,dc=asia,dc=edu,dc=tws"
|
#treebase = "ou=Asia Univ,dc=asia,dc=edu,dc=tws"
|
||||||
puts "==LDAP SEARCH START=="
|
#puts "==LDAP SEARCH START=="
|
||||||
ldap.search( :base => treebase, :filter => filter, :return_result => false ) do |entry|
|
#ldap.search( :base => treebase, :filter => filter, :return_result => false ) do |entry|
|
||||||
puts "DN: #{entry.dn}"
|
# puts "DN: #{entry.dn}"
|
||||||
entry.each do |attribute, values|
|
# entry.each do |attribute, values|
|
||||||
puts " #{attribute}:"
|
# puts " #{attribute}:"
|
||||||
values.each do |value|
|
# values.each do |value|
|
||||||
puts " --->#{value}"
|
# puts " --->#{value}"
|
||||||
end
|
# end
|
||||||
end
|
# end
|
||||||
end
|
#end
|
||||||
puts "==LDAP SEARCH END=="
|
3puts "==LDAP SEARCH END=="
|
||||||
session[:user_id] = user.id
|
session[:user_id] = user.id
|
||||||
session[:login_referer] = nil
|
session[:login_referer] = nil
|
||||||
if params[:referer_url]
|
if params[:referer_url]
|
||||||
|
|
Loading…
Reference in New Issue