steffen: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php, 1.62.2.3, 1.62.2.4
cvs at intevation.de
cvs at intevation.de
Wed Jan 11 04:46:24 CET 2006
Author: steffen
Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv6164/kolab-webadmin/www/admin/user
Modified Files:
Tag: kolab_2_0_branch
user.php
Log Message:
Fix for issue848 (deleting users problem with distlists)
Index: user.php
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/Attic/user.php,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
diff -u -d -r1.62.2.3 -r1.62.2.4
--- user.php 13 Oct 2005 01:50:25 -0000 1.62.2.3
+++ user.php 11 Jan 2006 03:46:22 -0000 1.62.2.4
@@ -746,18 +746,22 @@
'(&(objectClass=kolabGroupOfNames)(member='.$ldap->escape($dn).'))',
array( 'dn', 'cn', 'mail', 'member' ) );
$distlists = $ldap->getEntries();
+ unset( $distlists['count'] );
foreach( $distlists as $distlist ) {
$dlmail = $distlist['mail'][0];
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 );
- } else {
- if( ldap_mod_del( $ldap->connection, $distlist['dn'], array('member' => $dn ) ) ) {
+ }
+ }
+ 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 {
- $errors[] = sprintf( _("Failure to remove account from distribution list '%s', account will not be deleted."), $dlmail);
- break;
- }
+ } else {
+ $errors[] = sprintf( _("Failure to remove account from distribution list '%s', account will not be deleted."), $dlmail);
+ break;
}
}
More information about the commits
mailing list