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 com.woltlab.wcf
13 * @subpackage system.bulk.processing.user
14 * @category Community Framework
17 class RemoveFromUserGroupsUserBulkProcessingAction extends AbstractUserGroupsUserBulkProcessingAction {
19 * @see \wcf\system\bulk\processing\user\AbstractUserGroupsUserBulkProcessingAction::$inputName
21 public $inputName = 'removeFromUserGroupIDs';
24 * @see \wcf\system\bulk\processing\user\AbstractUserGroupsUserBulkProcessingAction::executeUserAction()
26 protected function executeUserAction(UserEditor $user) {
27 $user->removeFromGroups($this->userGroupIDs);
31 * @see \wcf\system\bulk\processing\IBulkProcessingAction::getObjectList()
33 public function getObjectList() {
34 $userList = parent::getObjectList();
36 // the active user may not remove themselves from any user group
37 // to avoid potential permission issues
38 $userList->getConditionBuilder()->add('user_table.userID <> ?', [WCF::getUser()->userID]);