modified UserAction and UserEditor.
authorMarkus Gerdelmann <mdman@mdman.de>
Wed, 31 Aug 2011 14:05:11 +0000 (16:05 +0200)
committerMarkus Gerdelmann <mdman@mdman.de>
Wed, 31 Aug 2011 14:05:11 +0000 (16:05 +0200)
wcfsetup/install/files/lib/data/user/UserAction.class.php
wcfsetup/install/files/lib/data/user/UserEditor.class.php

index 766177ffea759806b3486de39f1a078eac4f6cf6..494a68f21c37fb23981474dff458410c63b0d5ef 100644 (file)
@@ -128,7 +128,7 @@ class UserAction extends AbstractDatabaseObjectAction {
                
                foreach ($this->objects as $userEditor) {
                        if (count($groupIDs)) {
-                               $userEditor->addToGroups($groupIDs, false, false);
+                               $userEditor->addToGroups($groupIDs, true, true);
                        }
                        
                        if (count($removeGroups)) {
index 9e58c5feebd92028a418f08f478b6c84fbd78247..39463d4a961420b2ff25738b85fce5fe548ed6a3 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 INTO     wcf".WCF_N."_user_to_group
                                                (userID, groupID)
                                VALUES          (?, ?)";
                        $statement = WCF::getDB()->prepareStatement($sql);