UserEditor.class.php modified.
authorMarkus Gerdelmann <mdman@mdman.de>
Tue, 30 Aug 2011 08:12:11 +0000 (11:12 +0300)
committerMarkus Gerdelmann <mdman@mdman.de>
Tue, 30 Aug 2011 08:12:11 +0000 (11:12 +0300)
Query now change into INSERT IGNORE INTO, so all DBs can work with.

BugFix for FATAL-ERROR during edit User.

wcfsetup/install/files/lib/data/user/UserEditor.class.php

index 9e58c5feebd92028a418f08f478b6c84fbd78247..42aa36e148d8736d06f0358cb26cd22d755b69e2 100644 (file)
@@ -140,7 +140,7 @@ class UserEditor extends DatabaseObjectEditor {
                
                // insert new groups
                if (count($groupIDs) > 0) {
-                       $sql = "REPLACE INTO    wcf".WCF_N."_user_to_group
+                       $sql = "INSERT IGNORE INTO      wcf".WCF_N."_user_to_group
                                                (userID, groupID)
                                VALUES          (?, ?)";
                        $statement = WCF::getDB()->prepareStatement($sql);