summaryrefslogtreecommitdiff
path: root/www/admin/user/user.php.in
diff options
context:
space:
mode:
authorSteffen Hansen <steffen@kdab.com>2006-01-11 15:51:34 (GMT)
committerSteffen Hansen <steffen@kdab.com>2006-01-11 15:51:34 (GMT)
commit1c07b360b3c5ada6d96cd0a2b66fca2b5d631402 (patch)
treed1046473960d555fefb2932d4661340a5bb9d1ea /www/admin/user/user.php.in
parentc6feb773cd79f088c78ba52f6ba7cb31ea1d5ac0 (diff)
downloadkolab-webadmin-1c07b360b3c5ada6d96cd0a2b66fca2b5d631402.tar.gz
Fix for issue848 (deleting users problem with distlists)
Diffstat (limited to 'www/admin/user/user.php.in')
-rw-r--r--www/admin/user/user.php.in17
1 files changed, 10 insertions, 7 deletions
diff --git a/www/admin/user/user.php.in b/www/admin/user/user.php.in
index 68ed47d..26ec099 100644
--- a/www/admin/user/user.php.in
+++ b/www/admin/user/user.php.in
@@ -781,14 +781,17 @@ switch( $action ) {
if( !$dlmail ) $dlmail = $distlist['cn'][0]; # Compatibility with old stuff
if( $distlist['member']['count'] == 1 ) {
$errors[] = sprintf(_("Account could not be deleted, distribution list '%s' depends on it."), $dlmail);
+ }
+ }
+ if( !$errors ) foreach( $distlists as $distlist ) {
+ $dlmail = $distlist['mail'][0];
+ if( !$dlmail ) $dlmail = $distlist['cn'][0]; # Compatibility with old stuff
+ if( ldap_mod_del( $ldap->connection, $distlist['dn'], array('member' => $dn ) ) ) {
+ $messages[] = sprintf(_("Account removed from distribution list '%s'."), $dlmail);
} else {
- if( ldap_mod_del( $ldap->connection, $distlist['dn'], array('member' => $dn ) ) ) {
- $messages[] = sprintf(_("Account removed from distribution list '%s'."), $dlmail);
- } else {
- $errors[] = sprintf(_("Failure to remove account from distribution list '', account will not be deleted."),
- $dlmail);
- break;
- }
+ $errors[] = sprintf(_("Failure to remove account from distribution list '', account will not be deleted."),
+ $dlmail);
+ break;
}
}