2 namespace wcf\system\bulk\processing\user;
3 use wcf\data\user\UserEditor;
7 * Bulk processing action implementation for removing users from user groups.
9 * @author Matthias Schmidt
10 * @copyright 2001-2016 WoltLab GmbH
11 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
12 * @package WoltLabSuite\Core\System\Bulk\Processing\User
15 class RemoveFromUserGroupsUserBulkProcessingAction extends AbstractUserGroupsUserBulkProcessingAction {
19 public $inputName = 'removeFromUserGroupIDs';
24 protected function executeUserAction(UserEditor $user) {
25 $user->removeFromGroups($this->userGroupIDs);
31 public function getObjectList() {
32 $userList = parent::getObjectList();
34 // the active user may not remove themselves from any user group
35 // to avoid potential permission issues
36 $userList->getConditionBuilder()->add('user_table.userID <> ?', [WCF::getUser()->userID]);