From: michag86 Date: Wed, 8 Oct 2014 12:05:06 +0000 (+0200) Subject: cleanup group admin(s) on deleteGroup X-Git-Tag: v7.0.4RC1~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b35a5b5a8520cb52a5a55df5257ac30570b952b9;p=nextcloud-server.git cleanup group admin(s) on deleteGroup --- 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; }