Permalink
Browse files

Ensure only target groups_members are added to backup. MDL-12453

  • Loading branch information...
1 parent 9046955 commit a72cd02f9ec11d795c47f933353330595ae119dd stronk7 committed Mar 9, 2008
Showing with 7 additions and 2 deletions.
  1. +7 −2 backup/backuplib.php
View
@@ -2036,8 +2036,13 @@ function backup_groups_members_info($bf,$preferences,$groupid) {
$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) {

0 comments on commit a72cd02

Please sign in to comment.