check that an attribute is defined and not just non-zero
authorGerald Carter <jerry@samba.org>
Thu, 12 Jun 2003 13:41:13 +0000 (13:41 +0000)
committerGerald Carter <jerry@samba.org>
Thu, 12 Jun 2003 13:41:13 +0000 (13:41 +0000)
(This used to be commit 8c18174a899e9578e0e82d17c7602e84b342644c)

examples/LDAP/convertSambaAccount

index f5b49ff095784812662b0af961614a92b9ce9fe6..1cfb3ee2a4d68f84f8d20698147eec53d20101c0 100755 (executable)
@@ -93,7 +93,7 @@ while ( !$ldif->eof ) {
        
 
        foreach $key ( keys %attr_map ) {
-               if ( $entry->get_value($key) ) {
+               if ( defined($entry->get_value($key)) ) {
                        $entry->add( $attr_map{$key} => $entry->get_value($key) );
                        $entry->delete( $key );
                }