Fixed a variable scope problem
This commit is contained in:
parent
1707f8cd05
commit
9e77f9d031
1 changed files with 4 additions and 4 deletions
|
|
@ -104,12 +104,12 @@ sub registrationForm {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub registrationFormSave {
|
sub registrationFormSave {
|
||||||
my($uri, $ldap, $auth, $search, $connectDN, $uid);
|
my($$auth, $connectDN);
|
||||||
my $uid = shift;
|
my $uid = shift;
|
||||||
$uri = URI->new($session{setting}{ldapURL});
|
my $uri = URI->new($session{setting}{ldapURL});
|
||||||
$ldap = Net::LDAP->new($uri->host, (port=>$uri->port));
|
my $ldap = Net::LDAP->new($uri->host, (port=>$uri->port));
|
||||||
$ldap->bind;
|
$ldap->bind;
|
||||||
$search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'});
|
my $search = $ldap->search (base => $uri->dn, filter => $session{setting}{ldapId}."=".$session{form}{'authLDAP.ldapId'});
|
||||||
if (defined $search->entry(0)) {
|
if (defined $search->entry(0)) {
|
||||||
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
$connectDN = "cn=".$search->entry(0)->get_value("cn");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue