summaryrefslogtreecommitdiffstats
path: root/web/lib
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:02 +0200
commitd668ef0bcda232d740f371a94afcd2cd4e462b3c (patch)
tree9a41d63d9b698d225b6ab0efc56b7e4615389a4d /web/lib
parent21c457817fe8ec5db60a10e2270f9fcf951aca5f (diff)
downloadaur-d668ef0bcda232d740f371a94afcd2cd4e462b3c.tar.gz
aur-d668ef0bcda232d740f371a94afcd2cd4e462b3c.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>
Diffstat (limited to 'web/lib')
-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(