From e30621f329b6be05ffb09964390e5839c7650dba Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 29 Mar 2021 22:54:10 +0200 Subject: 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(-) (limited to 'web/lib/acctfuncs.inc.php') diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index bc603d3b..df016c6d 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( -- cgit v1.2.3-24-g4f1b