steffen: server/kolab-webadmin/kolab-webadmin/www/admin/user user.php.in, 1.1, 1.2

cvs at intevation.de cvs at intevation.de
Wed Jan 11 16:51:36 CET 2006


Author: steffen

Update of /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user
In directory doto:/tmp/cvs-serv20283/kolab-webadmin/www/admin/user

Modified Files:
	user.php.in 
Log Message:
Fix for issue848 (deleting users problem with distlists)

Index: user.php.in
===================================================================
RCS file: /kolabrepository/server/kolab-webadmin/kolab-webadmin/www/admin/user/user.php.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- user.php.in	30 Dec 2005 11:07:18 -0000	1.1
+++ user.php.in	11 Jan 2006 15:51:34 -0000	1.2
@@ -781,14 +781,17 @@
 	 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;
 	 }
    }
 





More information about the commits mailing list