aboutsummaryrefslogtreecommitdiffstats
path: root/admin/group_list.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/group_list.php')
-rw-r--r--admin/group_list.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/admin/group_list.php b/admin/group_list.php
index 3fbec59de..d399a6d69 100644
--- a/admin/group_list.php
+++ b/admin/group_list.php
@@ -34,10 +34,18 @@ include_once( PHPWG_ROOT_PATH.'admin/include/isadmin.inc.php' );
$error = array();
if ( isset( $_POST['delete'] ) && isset( $_POST['confirm_delete'] ) )
{
+ // destruction of the access linked to the group
+ $query = 'DELETE FROM '.GROUP_ACCESS_TABLE;
+ $query.= ' WHERE group_id = '.$_POST['group_id'];
+ $query.= ';';
+ pwg_query( $query );
+
+ // destruction of the users links for this group
$query = 'DELETE FROM ' . USER_GROUP_TABLE;
$query.= ' WHERE group_id = '.$_POST['group_id'];
pwg_query( $query );
+ // destruction of the group
$query = 'DELETE FROM ' . GROUPS_TABLE;
$query.= ' WHERE id = '.$_POST['group_id'];
$query.= ';';