Added missing update of articles after user renaming
authorMarcel Werk <burntime@woltlab.com>
Sun, 9 Oct 2016 10:06:28 +0000 (12:06 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sun, 9 Oct 2016 10:06:28 +0000 (12:06 +0200)
wcfsetup/install/files/lib/data/user/UserAction.class.php

index 3511d756404d8bbf55ab00d8d8ecac62063210fc..698d08fae41a47375b0f2b3a57d3a1676bafa7c2 100644 (file)
@@ -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 = ?