Fixes #1215
authorMatthias Schmidt <gravatronics@live.com>
Sun, 14 Apr 2013 12:45:25 +0000 (14:45 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 14 Apr 2013 12:45:25 +0000 (14:45 +0200)
wcfsetup/install/files/lib/acp/form/UsersMassProcessingForm.class.php

index 1dac8088dabf513228ae006dc2c57dfaeb782be2..032c14dfd9f71a08290cc774981544da7bec4351 100644 (file)
@@ -279,9 +279,10 @@ class UsersMassProcessingForm extends UserOptionListForm {
                        case 'assignToGroup':
                                WCF::getSession()->checkPermissions(array('admin.user.canEditUser'));
                                
-                               $userIDArray = $this->fetchUsers(function($userID, array $userData) {
+                               $_this = $this;
+                               $userIDArray = $this->fetchUsers(function($userID, array $userData) use ($_this) {
                                        $user = new UserEditor(new User(null, $userData));
-                                       $user->addToGroups($this->assignToGroupIDArray, false, false);
+                                       $user->addToGroups($_this->assignToGroupIDArray, false, false);
                                });
                                
                                UserStorageHandler::getInstance()->reset($userIDArray, 'groupIDs', 1);