From: Marcel Werk Date: Sun, 9 Oct 2016 10:06:28 +0000 (+0200) Subject: Added missing update of articles after user renaming X-Git-Tag: 3.0.0_Beta_3~50^2~48 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e06bab73ea741333e5e99eac0b6420caf0e28140;p=GitHub%2FWoltLab%2FWCF.git Added missing update of articles after user renaming --- 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 = ?