From 07e6a4d3a1d2e7d6639bd88735653b509f86c8b1 Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Tue, 10 May 2005 22:03:09 +0000 Subject: [PATCH] Fixed issue where authentication based searches were not storing user names correctly --- lib/WebGUI/Auth/LDAP.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/WebGUI/Auth/LDAP.pm b/lib/WebGUI/Auth/LDAP.pm index 82cb37d40..a2bc66584 100644 --- a/lib/WebGUI/Auth/LDAP.pm +++ b/lib/WebGUI/Auth/LDAP.pm @@ -251,7 +251,13 @@ sub createAccountSave { #Get connectDN from settings my $uri = URI->new($connection->{ldapURL}); my $ldap = Net::LDAP->new($uri->host, (port=>$uri->port)); - $ldap->bind; + my $auth; + if($connection->{connectDn}) { + $auth = $ldap->bind(dn=>$connection->{connectDn}, password=>$connection->{identifier}); + }else{ + $auth = $ldap->bind; + } + #$ldap->bind; my $search = $ldap->search (base => $uri->dn, filter=>$connection->{ldapIdentity}."=".$username); my $connectDN = ""; if (defined $search->entry(0)) {