class vB_Registry

Class to store commonly-used variables

Properties

vB_Datastore $datastore Datastore object.
vB_Input_Cleaner $input Input cleaner object.
vB_Database $db Database object.
array $userinfo Array of info about the current browsing user. In the case of a registered user, this will be results of fetch_userinfo(). A guest will have slightly different entries.
vB_Session $session Session object.
array $csrf_skip_list Array of do actions that are exempt from checks
array $config Array of data from config.php.
array $GPC Array of data that has been cleaned by the input cleaner.
array $GPC_exists Array of booleans. When cleaning a variable, you often lose the ability to determine if it was specified in the user's input. Entries in this array are true if the variable existed before cleaning.
array $superglobal_size The size of the super global arrays.
string $ipaddress IP Address of the current browsing user.
string $alt_ip Alternate IP for the browsing user. This attempts to use various HTTP headers to find the real IP of a user that may be behind a proxy.
string $scriptpath The URL of the currently browsed page.
string $basepath The request basepath.
string $wolpath Similar to the URL of the current page, but expands some items and includes data submitted via POST. Used for Who's Online purposes.
string $script The URL of the current page, without anything after the '?'.
string $url Generally the URL of the referring page if there is one, though it is often set in various places of the code. Used to determine the page to redirect to, if necessary.
$bf_ugp
$bf_ugp_adminpermissions
$bf_ugp_calendarpermissions
$bf_ugp_forumpermissions
$bf_ugp_genericoptions
$bf_ugp_genericpermissions
$bf_ugp_pmpermissions
$bf_ugp_wolpermissions
$bf_ugp_visitormessagepermissions
$bf_misc
$bf_misc_calmoderatorpermissions
$bf_misc_forumoptions
$bf_misc_intperms
$bf_misc_languageoptions
$bf_misc_moderatorpermissions
$bf_misc_useroptions
$bf_misc_hvcheck
$options
$attachmentcache
$avatarcache
$birthdaycache
$eventcache
$iconcache
$markupcache
$stylecache
$languagecache
$smiliecache
$usergroupcache
$bbcodecache
$socialsitecache
$cron
$mailqueue
$banemail
$maxloggedin
$products
$ranks
$statement
$userstats
$wol_spiders
$loadcache
$noticecache
$bbcode_style
$templatecache
$versionnumber
$nozip
$debug
$noheader
$stylevars
vB_Shutdown $shutdown Shutdown handler
array $vbcms For storing global information specific to the CMS
array $apiclient For storing information of the API Client
$cleaner

Methods

__construct()

Constructor - initializes the nozip system, and calls and instance of the vB_Input_Cleaner class

bool
check_user_permission(string $group, string $permission)

Check if a user has a specific permission

Details

at line 988
__construct()

Constructor - initializes the nozip system, and calls and instance of the vB_Input_Cleaner class

at line 1025
bool check_user_permission(string $group, string $permission)

Check if a user has a specific permission

This is intended to replace direct acces to the userinfo['permissions'] array.

For example: $vbulletin->check_user_permission('genericpermissions', 'cancreatetag')

which replaces ($vbulletin->userinfo['permissions']['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['cancreatetag'])

Parameters

string $group the permission group to check
string $permission the permission to check within the group

Return Value

bool If the user has the requested permission