fixed bug: setting spamassassin options fails for user without any SA settings

This commit is contained in:
lars 2006-01-29 19:38:07 +00:00
parent 385f0cc3ad
commit de44f72081

View file

@ -342,12 +342,17 @@ sub update_filter_options {
return (0==1); return (0==1);
} }
$result = $ldap->modify($user_dn, delete => ['spamassassin'] ); {
if ($result->is_error) { my @spam_options = &get_ldap_values('spamassassin');
warn $result->error_text; if ($#spam_options > 0) {
$warning = 'UpdateFilterOptions'; $result = $ldap->modify($user_dn, delete => ['spamassassin'] );
$ldap->unbind; if ($result->is_error) {
return (1==0); warn $result->error_text;
$warning = 'UpdateFilterOptions';
$ldap->unbind;
return (1==0);
}
}
} }
{ {