Function addMembersToGroup
Add one or more members to a membergroup
Requires the manage_membergroups permission. Function has protection against adding members to implicit groups. Non-admins are not able to add members to the admin group.
Package: SMF
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Membergroups.php
Copyright: 2020 Simple Machines and individual contributors
License: BSD
Author: Simple Machines https://www.simplemachines.org
Located at Sources/Subs-Membergroups.php
integer|array |
$members |
A single member or an array containing the IDs of members |
integer |
$group |
The group to add them to |
string |
$type = 'auto' |
<p>Specifies whether the group is added as primary or as additional group. Supported types: - only_primary - Assigns a membergroup as primary membergroup, but only if a member has not yet a primary membergroup assigned, unless the member is already part of the membergroup. - only_additional - Assigns a membergroup to the additional membergroups, unless the member is already part of the membergroup. - force_primary - Assigns a membergroup as primary membergroup no matter what the previous primary membergroup was. - auto - Assigns a membergroup to the primary group if it's still available. If not, assign it to the additional group.</p> |
boolean |
$permissionCheckDone = false |
Whether we've already done a permission check |
boolean |
$ignoreProtected = false |
Whether to ignore protected groups |
boolean
|
Whether the operation was successful |