vB_Api_UserGroup
        
        extends vB_Api
    
    
            
            in package
            
        
    
    
    
vB_Api_UserGroup
Tags
Table of Contents
Constants
- ADMINISTRATOR = 6
- AWAITINGEMAIL_SYSGROUPID = 3
- AWAITINGMODERATION_SYSGROUPID = 4
- BANNED = 8
- CHANNEL_MEMBER_SYSGROUPID = 11
- CHANNEL_MODERATOR_SYSGROUPID = 10
- CHANNEL_OWNER_SYSGROUPID = 9
- CMS_AUTHOR_SYSGROUPID = 15
- CMS_EDITOR_SYSGROUPID = 16
- MODERATOR = 7
- REGISTERED_SYSGROUPID = 2
- SG_MEMBER_SYSGROUPID = 14
- SG_MODERATOR_SYSGROUPID = 13
- SG_OWNER_SYSGROUPID = 12
- SUPER_MODERATOR = 5
- UNREGISTERED_SYSGROUPID = 1
Methods
- __serialize() : array<string|int, mixed>
- __sleep() : array<string|int, mixed>
- __unserialize() : void
- __wakeup() : void
- callNamed() : The
- Call the given api function by name with a named arguments list.
- checkApiState() : mixed
- This method checks whether the API method is enabled.
- clearCache() : mixed
- Clears all previously loaded API objects.
- delete() : array<string|int, mixed>
- Delete an usergroup
- deletePromotion() : void
- Delete an usergroup promotion
- fetchBannedUsergroups() : mixed
- Fetch a list of banned usergroups
- fetchPrivateGroups() : mixed
- Fetch the special groups. Used by permissions check. Each is a systemgroupid in the usergroups table
- fetchPromotions() : array<string|int, mixed>
- Fetch a list of usergroup promotions
- fetchUsergroupByID() : array<string|int, mixed>
- Fetch usergroup information by its ID
- fetchUsergroupBySystemID() : array<string|int, mixed>
- Fetch usergroup information by its SystemID
- fetchUsergroupList() : array<string|int, mixed>
- Returns a list of all user groups.
- getApiClassName() : mixed
- getMemberGroupId() : false|int
- Returns the usergroupid for member group
- getModeratorGroupId() : false|int
- Returns the usergroupid for moderator group
- getMultipleGroupIds() : array<string|int, mixed>
- Returns the usergroupids for multiple specified SYSGROUPID constants
- getOwnerGroupId() : false|int
- Returns the usergroupid for owner group
- instance() : vB_Api
- Returns an instance of the API object which translates exceptions to an array Use this method for API clients.
- instanceInternal() : vB_Api
- Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API
- map_vb4_input_to_vb5() : string
- Returns vb5 api method name.
- map_vb5_errors_to_vb4() : mixed
- Alters the error array in any way necessary to interface correctly with vb4.
- map_vb5_output_to_vb4() : mixed
- Alters the output array in any way necessary to interface correctly with vb4.
- save() : int
- Insert a new usergroup or update an existing usergroup
- savePromotion() : int
- Insert a new usergroup promotion or update an existing one
- updateDisplayGroup() : array<string|int, mixed>
- Update user's display group
Constants
ADMINISTRATOR
    public
        mixed
    ADMINISTRATOR
    = 6
    
    
    
    
AWAITINGEMAIL_SYSGROUPID
    public
        mixed
    AWAITINGEMAIL_SYSGROUPID
    = 3
    
    
    
    
AWAITINGMODERATION_SYSGROUPID
    public
        mixed
    AWAITINGMODERATION_SYSGROUPID
    = 4
    
    
    
    
BANNED
    public
        mixed
    BANNED
    = 8
    
    
    
    
CHANNEL_MEMBER_SYSGROUPID
    public
        mixed
    CHANNEL_MEMBER_SYSGROUPID
    = 11
    
    
    
    
CHANNEL_MODERATOR_SYSGROUPID
    public
        mixed
    CHANNEL_MODERATOR_SYSGROUPID
    = 10
    
    
    
    
CHANNEL_OWNER_SYSGROUPID
    public
        mixed
    CHANNEL_OWNER_SYSGROUPID
    = 9
    
    
    
    
CMS_AUTHOR_SYSGROUPID
    public
        mixed
    CMS_AUTHOR_SYSGROUPID
    = 15
    
    
    
    
CMS_EDITOR_SYSGROUPID
    public
        mixed
    CMS_EDITOR_SYSGROUPID
    = 16
    
    
    
    
MODERATOR
    public
        mixed
    MODERATOR
    = 7
    
    
    
    
REGISTERED_SYSGROUPID
    public
        mixed
    REGISTERED_SYSGROUPID
    = 2
    
    
    
    
SG_MEMBER_SYSGROUPID
    public
        mixed
    SG_MEMBER_SYSGROUPID
    = 14
    
    
    
    
SG_MODERATOR_SYSGROUPID
    public
        mixed
    SG_MODERATOR_SYSGROUPID
    = 13
    
    
    
    
SG_OWNER_SYSGROUPID
    public
        mixed
    SG_OWNER_SYSGROUPID
    = 12
    
    
    
    
SUPER_MODERATOR
    public
        mixed
    SUPER_MODERATOR
    = 5
    
    
    
    
UNREGISTERED_SYSGROUPID
    public
        mixed
    UNREGISTERED_SYSGROUPID
    = 1
    
    
    
    
Methods
__serialize()
    public
                    __serialize() : array<string|int, mixed>
    Return values
array<string|int, mixed>__sleep()
    public
                    __sleep() : array<string|int, mixed>
    Return values
array<string|int, mixed>__unserialize()
    public
                    __unserialize(array<string|int, mixed> $serialized) : void
    Parameters
- $serialized : array<string|int, mixed>
__wakeup()
    public
                    __wakeup() : void
    callNamed()
Call the given api function by name with a named arguments list.
    public
                    callNamed() : The
    Used primarily to translate REST requests into API calls.
Return values
The —return of the method or an error if the method doesn't exist, or is static, a constructor or destructor, or otherwise shouldn't be callable as and API method. It is also an error if the value of a paramater is not provided and that parameter doesn't have a default value.
checkApiState()
This method checks whether the API method is enabled.
    public
                    checkApiState(mixed $method) : mixed
    For extensions check make sure $controller property is already set.
Parameters
- $method : mixed
clearCache()
Clears all previously loaded API objects.
    public
            static        clearCache() : mixed
    Intended for use in tests where the loading pattern can cause issues with objects that cache thier own data.
delete()
Delete an usergroup
    public
                    delete(int $usergroupid) : array<string|int, mixed>
    Parameters
- $usergroupid : int
- 
                    Usergroup ID to be deleted 
Return values
array<string|int, mixed> —-- standard success array
deletePromotion()
Delete an usergroup promotion
    public
                    deletePromotion(mixed $userpromotionid) : void
    Parameters
- $userpromotionid : mixed
fetchBannedUsergroups()
Fetch a list of banned usergroups
    public
                    fetchBannedUsergroups() : mixed
    fetchPrivateGroups()
Fetch the special groups. Used by permissions check. Each is a systemgroupid in the usergroups table
    public
                    fetchPrivateGroups() : mixed
    @return	array -- usergroup ids
fetchPromotions()
Fetch a list of usergroup promotions
    public
                    fetchPromotions([int $usergroupid = 0 ]) : array<string|int, mixed>
    Parameters
- $usergroupid : int = 0
- 
                    Fetch promotions for only this usergroup 
Return values
array<string|int, mixed> —Promotions information
fetchUsergroupByID()
Fetch usergroup information by its ID
    public
                    fetchUsergroupByID(int $usergroupid) : array<string|int, mixed>
    Returns extra fields if the user has canadminpermissions
Parameters
- $usergroupid : int
- 
                    Usergroup ID 
Tags
Return values
array<string|int, mixed> —Usergroup information -- returns usergroup array
fetchUsergroupBySystemID()
Fetch usergroup information by its SystemID
    public
                    fetchUsergroupBySystemID(int $systemgroupid) : array<string|int, mixed>
    Parameters
- $systemgroupid : int
Tags
Return values
array<string|int, mixed> —Usergroup information -- returns usergroup array
fetchUsergroupList()
Returns a list of all user groups.
    public
                    fetchUsergroupList([bool $flushcache = false ]) : array<string|int, mixed>
    Returns extra fields if the user has canadminpermissions
Parameters
- $flushcache : bool = false
- 
                    -- no longer used. 
Return values
array<string|int, mixed> —-- array of groups each with the fields:
- 
canoverride 
- 
closetag 
- 
description 
- 
opentag 
- 
systemgroupid 
- 
title 
- 
usergroupid 
- 
usertitle (Admin only) ** adminpermissions ** albummaxpics ** albummaxsize ** albumpermissions ** albumpicmaxheight ** albumpicmaxwidth ** attachlimit ** avatarmaxheight ** avatarmaxsize ** avatarmaxwidth ** createpermissions ** forumpermissions ** forumpermissions2 ** genericoptions ** genericpermissions ** genericpermissions2 ** groupiconmaxsize ** maximumsocialgroups ** passwordhistory ** passwordexpires ** pmpermissions ** pmquota ** pmsendmax ** pmthrottlequantity ** sigmaxchars ** sigmaximages ** sigmaxlines ** sigmaxrawchars ** sigmaxsizebbcode ** signaturepermissions ** sigpicmaxheight ** sigpicmaxsize ** sigpicmaxwidth ** socialgrouppermissions ** usercsspermissions ** visitormessagepermissions ** wolpermissions 
getApiClassName()
    public
            static        getApiClassName(mixed $controller) : mixed
    Parameters
- $controller : mixed
getMemberGroupId()
Returns the usergroupid for member group
    public
                    getMemberGroupId() : false|int
    Return values
false|intgetModeratorGroupId()
Returns the usergroupid for moderator group
    public
                    getModeratorGroupId() : false|int
    Return values
false|intgetMultipleGroupIds()
Returns the usergroupids for multiple specified SYSGROUPID constants
    public
                    getMultipleGroupIds(array<string|int, mixed> $groups) : array<string|int, mixed>
    Parameters
- $groups : array<string|int, mixed>
- 
                    -- int, the systemIDs to look up the db ids from 
Return values
array<string|int, mixed> —-- usergroup ids -- NOTE: The usergroups in the return array are in the same order as in the input array. Some callers depend on this behavior.
getOwnerGroupId()
Returns the usergroupid for owner group
    public
                    getOwnerGroupId() : false|int
    Return values
false|intinstance()
Returns an instance of the API object which translates exceptions to an array Use this method for API clients.
    public
            static        instance(string $controller[, bool $refresh_cache = false ]) : vB_Api
    Parameters
- $controller : string
- 
                    -- name of the API controller to load 
- $refresh_cache : bool = false
- 
                    -- true if we want to force the cache to update with a new api object primarily intended for testing 
Return values
vB_ApiinstanceInternal()
Returns an instance of the API object which doesn't handle exceptions This should only be used in other API objects, not for clients of the API
    public
            static        instanceInternal(string $controller[, bool $refresh_cache = false ]) : vB_Api
    Parameters
- $controller : string
- 
                    -- name of the API controller to load 
- $refresh_cache : bool = false
- 
                    -- true if we want to force the cache to update with a new api object primarily intended for testing 
Return values
vB_Apimap_vb4_input_to_vb5()
Returns vb5 api method name.
    public
            static        map_vb4_input_to_vb5(string $method, array<string|int, mixed> &$request) : string
    May alter request array.
Parameters
- $method : string
- 
                    -- vb4 method name 
- $request : array<string|int, mixed>
- 
                    -- $_REQUEST array for this api request 
Return values
stringmap_vb5_errors_to_vb4()
Alters the error array in any way necessary to interface correctly with vb4.
    public
            static        map_vb5_errors_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
    Parameters
- $method : string
- 
                    -- vb4 method name 
- $data : array<string|int, mixed>
- 
                    -- error array from vb5 
map_vb5_output_to_vb4()
Alters the output array in any way necessary to interface correctly with vb4.
    public
            static        map_vb5_output_to_vb4(string $method, array<string|int, mixed> &$data) : mixed
    Parameters
- $method : string
- 
                    -- vb4 method name 
- $data : array<string|int, mixed>
- 
                    -- output array from vb5 
save()
Insert a new usergroup or update an existing usergroup
    public
                    save(array<string|int, mixed> $usergroup[, int $ugid_base = 0 ][, int $usergroupid = 0 ]) : int
    Parameters
- $usergroup : array<string|int, mixed>
- 
                    Usergroup information to be inserted or updated 
- $ugid_base : int = 0
- 
                    Usergroup ID. New inserted usergroup's forum permission will based on this usergroup. 
- $usergroupid : int = 0
- 
                    when updating an existing usergroup, pass usergroup ID as this parameter 
Return values
int —New or existing usergroup ID
savePromotion()
Insert a new usergroup promotion or update an existing one
    public
                    savePromotion(array<string|int, mixed> $promotion, int $usergroupid[, int $userpromotionid = 0 ]) : int
    Parameters
- $promotion : array<string|int, mixed>
- 
                    Promotion information with fields: - usergroupid
- reputation
- date
- posts
- strategy
- type
- reputationtype
- joinusergroupid
 
- $usergroupid : int
- $userpromotionid : int = 0
- 
                    Existing Usergroup promotion ID to be updated 
Return values
int —new or existing userpromotion ID
updateDisplayGroup()
Update user's display group
    public
                    updateDisplayGroup(mixed $userid, mixed $usergroupid) : array<string|int, mixed>
    Parameters
- $userid : mixed
- 
                    User ID 
- $usergroupid : mixed
- 
                    Usergroup ID to be used as display group 
Return values
array<string|int, mixed> —-- standard success array