fix lpt grantmail
This commit is contained in:
parent
2b5d936c8e
commit
37a7bd4b3f
@ -313,12 +313,12 @@ sub cmd_account_grantmail($)
|
||||
my @oc = $entry->get_value("objectClass");
|
||||
push @oc, "MailAccount";
|
||||
|
||||
$entry->replace("objectClass" => \@oc);
|
||||
$entry->replace("mailAccountActive" => [ "yes" ]);
|
||||
$entry->replace("objectClass" => @oc);
|
||||
|
||||
$entry->update($ldap);
|
||||
|
||||
log(INFO, "$login now grants to receive e-mail. Remember to add some aliases!");
|
||||
my $mesg = $entry->update($ldap) or die $!;
|
||||
if ($mesg->code != 0) { log(WARN, $mesg->error); return 0; }
|
||||
else { log(INFO, "$login now grants to receive e-mail. Remember to add some aliases!"); }
|
||||
|
||||
$ldap->unbind or die ("couldn't disconnect correctly");
|
||||
}
|
||||
@ -585,6 +585,7 @@ sub cmd_account_multiple_vieworchange($$$@)
|
||||
log(INFO, "Adding $change as ".$typeName."s for $login ...");
|
||||
|
||||
my @data = $mesg->entry(0)->get_value($type);
|
||||
|
||||
if (! grep(/^$change$/, @data)) {
|
||||
push @data, $change;
|
||||
$mesg->entry(0)->replace($type => \@data) or die $!;
|
||||
|
Reference in New Issue
Block a user