removeMembersFromGroups

Description

Remove one or more members from one or more membergroups.

Syntax

void removeMembersFromGroups (mixed $members[, mixed $groups])



Parameter $members

Expected type: Mixed
Description: The IDs of one or more members

Allowed types for $members
Allowed values Description
Integer The ID of a single member
Array of Integers The IDs of one or more members



Parameter $groups

Expected type: Mixed
Description: If specified, removes the specified member(s) from the specified group(s). Otherwise it will remove the members from all groups (except administrator if you're not an admin).

Allowed types for $groups
Allowed values Description
Integer The ID of a single group
Array of Integers The IDs of one or more groups


Notes

  • Requires the manage_membergroups permission.
  • Returns true on success or false on failure.
  • If groups is null, the specified members are stripped from all their membergroups.
  • Function includes a protection against removing from implicit groups (ie Regular Users or post groups)
  • Non-admins are not able to remove members from the admin group
Advertisement: