Closes #449 The user id should be mapped to the equivalent user id in new sites during activity restore
As the userid in the customcert_issues table were using the userid from the site where the activity was backed up, emails were being sent to those that had already received them. Theoretically there wwere also users who should have received an email who didn't get one.
This commit is contained in:
parent
471b5cce73
commit
32b255cb0d
1 changed files with 1 additions and 0 deletions
|
@ -159,6 +159,7 @@ class restore_customcert_activity_structure_step extends restore_activity_struct
|
||||||
|
|
||||||
$data->customcertid = $this->get_new_parentid('customcert');
|
$data->customcertid = $this->get_new_parentid('customcert');
|
||||||
$data->timecreated = $this->apply_date_offset($data->timecreated);
|
$data->timecreated = $this->apply_date_offset($data->timecreated);
|
||||||
|
$data->userid = $this->get_mappingid('user', $data->userid);
|
||||||
|
|
||||||
$newitemid = $DB->insert_record('customcert_issues', $data);
|
$newitemid = $DB->insert_record('customcert_issues', $data);
|
||||||
$this->set_mapping('customcert_issue', $oldid, $newitemid);
|
$this->set_mapping('customcert_issue', $oldid, $newitemid);
|
||||||
|
|
Loading…
Reference in a new issue