$action->executeAction();
}
+ if (!empty($removeGroups)) {
+ $action = new UserAction($this->objects, 'removeFromGroups', array(
+ 'groups' => $groupIDs
+ ));
+ $action->executeAction();
+ }
+
foreach ($this->objects as $userEditor) {
- if (!empty($removeGroups)) {
- $userEditor->removeFromGroups($removeGroups);
- }
-
if (!empty($userOptions)) {
$userEditor->updateUserOptions($userOptions);
}
}
/**
- * Add users to given groups.
+ * Remove users from given groups.
*/
public function removeFromGroups() {
if (empty($this->objects)) {