{
if (ref ($val) eq 'ARRAY')
{
- $entry->add ($field => [@$val]);
+ $entry->add ($field => [@$val]) if (@$val);
}
elsif (!ref ($val))
{
- $entry->add ($field => [$val]);
+ $entry->add ($field => [$val]) if ($val);
}
else
{
$obj->{'cn'} = $cn;
+ print STDERR "This is _update_dn, trying to set dn=$dn";
+
$entry->changetype ('modify');
$entry->replace (sn => $sn, givenName => $gn, cn => $cn);
+ $entry->update ($Ldap);
$entry->dn ($dn);
$entry->update ($Ldap);
}
my ($t_cn) = $e->get_value ('cn', asref => 0);
my ($t_id) = $e->get_value ('uid', asref => 0);
- print STDERR "LDAP result: $t_cn, $t_id";
-
if (!$id or $t_id)
{
$cn = $t_cn;