From 4982fc34929a0e3ed9573f3887d1d3668622fa5c Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 29 Mar 2021 22:54:10 +0200 Subject: [PATCH] Resolve SQL Error when deleting an account The account deletion code tries to remove user from PackageNotifications using the wrong column UsersID to identify the user by id. In the PackagePackageNotifications table the foreign key is called UserID. In the future ideally this would be unified into UserID for all tables. Closes: #12 Signed-off-by: Lukas Fleischer --- web/lib/acctfuncs.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 13d6348d..6ff09502 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -940,7 +940,7 @@ function user_delete($id) { $fields_delete = array( array("Sessions", "UsersID"), array("PackageVotes", "UsersID"), - array("PackageNotifications", "UsersID") + array("PackageNotifications", "UserID") ); $fields_set_null = array(