MDL-65959 badge: Reset external_identifiers if backpack details modified

This commit is contained in:
Peter Dias
2020-10-27 00:27:19 +08:00
parent 8308d10561
commit f451ef06cd
+5 -1
View File
@@ -69,7 +69,11 @@ if ($action == 'edit') {
} else if ($data = $form->get_data()) {
require_sesskey();
if (!empty($data->id)) {
badges_update_site_backpack($data->id, $data);
$id = $data->id;
badges_update_site_backpack($id, $data);
// Apart from the password, any change here would result in an error in other parts of the badge systems.
// In order to negate this, we restart any further mapping from scratch.
badges_external_delete_mappings($id);
} else {
badges_create_site_backpack($data);
}