fixed bug: setting spamassassin options fails for user without any SA settings
This commit is contained in:
parent
385f0cc3ad
commit
de44f72081
1 changed files with 11 additions and 6 deletions
|
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue