Skip to content

Commit

Permalink
Delete user_prefs on user delete
Browse files Browse the repository at this point in the history
  • Loading branch information
drlippman committed Mar 21, 2017
1 parent 2fb45cf commit aaa9709
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions admin/actions.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,14 @@
$stm->execute(array(':id'=>$_GET['id']));
}
if ($stm->rowCount()==0) { break;}
$stm = $DBH->prepare("DELETE FROM imas_user_prefs WHERE userid=:userid");
$stm->execute(array(':userid'=>$_GET['id']));
$stm = $DBH->prepare("DELETE FROM imas_students WHERE userid=:userid");
$stm->execute(array(':userid'=>$_GET['id']));
$stm = $DBH->prepare("DELETE FROM imas_teachers WHERE userid=:userid");
$stm->execute(array(':userid'=>$_GET['id']));
$stm = $DBH->prepare("DELETE FROM imas_tutors WHERE userid=:userid");
$stm->execute(array(':userid'=>$_GET['id']));
$stm = $DBH->prepare("DELETE FROM imas_assessment_sessions WHERE userid=:userid");
$stm->execute(array(':userid'=>$_GET['id']));
$stm = $DBH->prepare("DELETE FROM imas_exceptions WHERE userid=:userid");
Expand Down

0 comments on commit aaa9709

Please sign in to comment.