Commit 979e94e7 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1748079: deleting usr agreement when deleting intitution"

parents 01287e78 e98fd36d
......@@ -182,6 +182,10 @@ if ($institution || $add) {
delete_records('institution_config', 'institution', $values['i']);
delete_records('usr_custom_layout', 'institution', $values['i']);
delete_records('usr_registration', 'institution', $values['i']);
$versions = get_records_assoc('site_content_version', 'institution', $values['i']);
foreach($versions as $version) {
delete_records('usr_agreement', 'sitecontentid', $version->id);
delete_records('site_content_version', 'institution', $values['i']);
delete_records('oauth_server_registry', 'institution', $values['i']);
delete_records('institution', 'name', $values['i']);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment