From b35a5b5a8520cb52a5a55df5257ac30570b952b9 Mon Sep 17 00:00:00 2001 From: michag86 Date: Wed, 8 Oct 2014 14:05:06 +0200 Subject: [PATCH] cleanup group admin(s) on deleteGroup --- lib/private/group/database.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/private/group/database.php b/lib/private/group/database.php index 8aebefabd27..6bad55c8d5e 100644 --- a/lib/private/group/database.php +++ b/lib/private/group/database.php @@ -84,6 +84,10 @@ class OC_Group_Database extends OC_Group_Backend { $stmt = OC_DB::prepare( "DELETE FROM `*PREFIX*group_user` WHERE `gid` = ?" ); $stmt->execute( array( $gid )); + // Delete the group-groupadmin relation + $stmt = OC_DB::prepare( "DELETE FROM `*PREFIX*group_admin` WHERE `gid` = ?" ); + $stmt->execute( array( $gid )); + return true; } -- 2.39.5