Description

    object usergroup.create(object/array **userGroups**)

    This method allows to create new user groups.

    参数

    (object/array) 要创建的用户组。

    除了之外, 该方法接受以下参数。

    Parameters

    Additionally to the , the method accepts the following parameters.

    ParameterTypeDescription
    rightsobject/arrayPermissions to assign to the group
    tag_filtersarrayTag based permissions to assign to the group
    useridsstring/arrayIDs of users to add to the user group.

    (object) 返回包含“usrgrpids”属性下创建的用户组的ID的对象。 返回的ID的顺序与传递的用户组的顺序相匹配。

    Return values

    Returns an object containing the IDs of the created user groups under the usrgrpids property. The order of the returned IDs matches the order of the passed user groups.

    示例

    创建一个用户组

    创建一个用户组,拒绝访问主机组“2”,并向其添加用户。

    Examples

    Creating a user group

    Request:

    Response:

    1. {
    2. "result": {
    3. "20"
    4. ]
    5. },
    6. "id": 1

    来源

    CUserGroup::create() in frontends/php/include/classes/api/services/CUserGroup.php.

    See also

    Source

    CUserGroup::create() in frontends/php/include/classes/api/services/CUserGroup.php.