Ensure only target groups_members are added to backup. MDL-12453 ; merged from 19_STABLE

This commit is contained in:
stronk7 2008-03-09 17:28:17 +00:00
parent d1eb0531fb
commit bef163c889

View File

@ -2046,8 +2046,13 @@
$status = true;
//Get groups_members
$groups_members = get_records("groups_members","groupid",$groupid);
//Get groups_members that are being included in backup
$groups_members = get_records_sql("SELECT gm.*
FROM {$CFG->prefix}groups_members gm,
{$CFG->prefix}backup_ids bi
WHERE gm.groupid = $groupid
AND bi.backup_code = $preferences->backup_unique_code
AND bi.table_name = 'user'");
//Pring groups_members header
if ($groups_members) {