Fixed a bug where users could authenticate with no password if an administrator did not specify a connect dn for them.

This commit is contained in:
JT Smith 2003-05-16 03:06:50 +00:00
parent 3dd8cc4889
commit f78aa7fa43

View file

@ -40,6 +40,7 @@ sub authenticate {
$userId = $_[0]->[0];
my $identifier = $_[0]->[1];
$userData = WebGUI::Authentication::getParams($userId, 'LDAP');
return "No connect DN specified." if ($$userData{connectDN} eq "");
if ($uri = URI->new($userData->{ldapUrl})) {
$ldap = Net::LDAP->new($uri->host, (port=>$uri->port)) or $result = WebGUI::International::get(2,'Auth/LDAP');
return $result if $result;