Displaying 1 result from an estimated 1 matches for "initialize_ldap_con".
2008 Nov 28
1
Rails Beginner.. NoMethodError
...r < ActiveRecord::Base
set_table_name "users"
attr_accessor :title
def self.authenticate(username,password)
treebase = "dc=corp,dc=ha,dc=org,dc=hk"
filter = Net::LDAP::Filter.eq( "sAMAccountName", username )
login_succeeded = false
ldap_con = initialize_ldap_con(username,password)
if ldap_con.bind
login_succeeded = true
@title=ldap_con.search( :base => treebase, :filter => filter,
:attributes => ''displayname'').first.displayname.to_s
end
login_succeeded
end
# I have define the get_title here..
def ge...