Project

General

Profile

« Previous | Next » 

Revision 8415

Added by Jing Tao about 11 years ago

when a user reset the password, we search the user to use the base=o=org,dc=ecoinformatics,dc=org and filter is uid=username.

View differences:

ldapweb.cgi
890 890
        	return $entry;
891 891
    	}
892 892

  
893
    	if($ldapConfig->{$org}{'filter'}){
894
            debug("getLdapEntry: filter set, searching for base=$base, " .
895
                  "(&(uid=$username)($ldapConfig->{$org}{'filter'}))");
896
        	$mesg = $ldap->search ( base   => $base,
897
                filter => "(&(uid=$username)($ldapConfig->{$org}{'filter'}))");
898
    	} else {
899
            debug("getLdapEntry: no filter, searching for $base, (uid=$username)");
900
        	$mesg = $ldap->search ( base   => $base, filter => "(uid=$username)");
901
    	}
893
        $base = $ldapConfig->{$org}{'org'} . ',' . $base;
894
        debug("getLdapEntry, searching for $base, (uid=$username)");
895
        $mesg = $ldap->search ( base   => $base, filter => "(uid=$username)");
896
    	#if($ldapConfig->{$org}{'filter'}){
897
            #debug("getLdapEntry: filter set, searching for base=$base, " .
898
                  #"(&(uid=$username)($ldapConfig->{$org}{'filter'}))");
899
        	#$mesg = $ldap->search ( base   => $base,
900
                #filter => "(&(uid=$username)($ldapConfig->{$org}{'filter'}))");
901
    	#} else {
902
            #debug("getLdapEntry: no filter, searching for $base, (uid=$username)");
903
        	#$mesg = $ldap->search ( base   => $base, filter => "(uid=$username)");
904
    	#}
902 905
    
903 906
    	if ($mesg->count > 0) {
904 907
        	$entry = $mesg->pop_entry;

Also available in: Unified diff