From e06bab73ea741333e5e99eac0b6420caf0e28140 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Sun, 9 Oct 2016 12:06:28 +0200 Subject: [PATCH] Added missing update of articles after user renaming --- wcfsetup/install/files/lib/data/user/UserAction.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/lib/data/user/UserAction.class.php b/wcfsetup/install/files/lib/data/user/UserAction.class.php index 3511d75640..698d08fae4 100644 --- a/wcfsetup/install/files/lib/data/user/UserAction.class.php +++ b/wcfsetup/install/files/lib/data/user/UserAction.class.php @@ -364,6 +364,13 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio WCF::getDB()->beginTransaction(); + // update article + $sql = "UPDATE wcf".WCF_N."_article + SET username = ? + WHERE userID = ?"; + $statement = WCF::getDB()->prepareStatement($sql); + $statement->execute([$username, $userID]); + // update comments $sql = "UPDATE wcf".WCF_N."_comment SET username = ? -- 2.20.1