Commit 4d22385f authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic

Bug 1677038: Checks if framework plugin is installed

Checks if the framework plugin is installed
before deleting trying to delete a record in
a framework table.


Change-Id: I1c4844066682e327c71bc22288d3b831521f6e25
parent 7ecbb373
......@@ -1574,7 +1574,6 @@ function delete_user($userid) {
delete_records('usr_account_preference', 'usr', $userid);
delete_records('usr_activity_preference', 'usr', $userid);
delete_records('usr_infectedupload', 'usr', $userid);
delete_records('framework_assessment_feedback', 'usr', $userid);
delete_records('usr_institution', 'usr', $userid);
delete_records('usr_institution_request', 'usr', $userid);
delete_records('usr_password_request', 'usr', $userid);
......@@ -1582,6 +1581,10 @@ function delete_user($userid) {
delete_records('view_access', 'usr', $userid);
delete_records('usr_login_data', 'usr', $userid);
if (is_plugin_active('framework', 'module')) {
delete_records('framework_assessment_feedback', 'usr', $userid);
// Remove the user's views & artefacts
$viewids = get_column('view', 'id', 'owner', $userid);
if ($viewids) {
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