summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2021-03-29 22:54:10 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2021-03-30 00:39:07 +0200
commite30621f329b6be05ffb09964390e5839c7650dba (patch)
tree969b1636d34816c13e2e326523fdbfe6e020c2a6
parent56472ed91a10189e23a3bf66ba18946e205ed57a (diff)
downloadaur-e30621f329b6be05ffb09964390e5839c7650dba.tar.gz
aur-e30621f329b6be05ffb09964390e5839c7650dba.tar.xz
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 <lfleischer@archlinux.org>
-rw-r--r--web/lib/acctfuncs.inc.php2
1 files changed, 1 insertions, 1 deletions
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(