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