mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
Ensure only target groups_members are added to backup. MDL-12453 ; merged from 19_STABLE
This commit is contained in:
parent
d1eb0531fb
commit
bef163c889
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user