vBulletin 5.6.5 API

vB_User
in package
Uses vB_Trait_NoSerialize

Table of Contents

$users  : mixed
__serialize()  : mixed
__sleep()  : mixed
__unserialize()  : mixed
__wakeup()  : mixed
calcUsertimeDiff()  : mixed
clearUsersCache()  : mixed
Clears user cached information.
execStrikeUser()  : mixed
execUnstrikeUser()  : mixed
expandOptions()  : mixed
fetchMusername()  : string
fetches the proper username markup and title
fetchUserinfo()  : array<string|int, mixed>
Fetches an array containing info for the specified user, or false if user is not found
getUserInfoByCredential()  : mixed
Obtains user info depending on the login credentials method.
processLogout()  : info
Logs the current user out
processNewLogin()  : array<string|int, mixed>
Processes logins into CP Adapted from functions_login.php::process_new_login THIS METHOD DOES NOT SET ANY COOKIES, SO IT CANNOT REPLACE DIRECTLY THE LEGACY FUNCTION
setAdminCss()  : mixed
setGroupInTopic()  : bool
This grants a user additional permissions in a specific channel, by adding to the groupintopic table
verifySecurityToken()  : bool
Verifies a security token is valid
verifyStrikeStatus()  : mixed
Verifies that the user hasn't exceeded the strike total for attempted logins. Based both on user name and IP address.
cacheUserLocal()  : mixed
censorUserData()  : mixed

Properties

$users

protected static mixed $users = array()

Methods

__serialize()

public __serialize() : mixed
Return values
mixed

__sleep()

public __sleep() : mixed
Return values
mixed

__unserialize()

public __unserialize(mixed $serialized) : mixed
Parameters
$serialized : mixed
Return values
mixed

__wakeup()

public __wakeup() : mixed
Return values
mixed

calcUsertimeDiff()

public static calcUsertimeDiff(mixed $userinfo) : mixed
Parameters
$userinfo : mixed
Return values
mixed

clearUsersCache()

Clears user cached information.

public static clearUsersCache(mixed $userid) : mixed
Parameters
$userid : mixed
Return values
mixed

execStrikeUser()

public static execStrikeUser([mixed $username = '' ]) : mixed
Parameters
$username : mixed = ''
Return values
mixed

execUnstrikeUser()

public static execUnstrikeUser(mixed $username) : mixed
Parameters
$username : mixed
Return values
mixed

expandOptions()

public static expandOptions(mixed &$user) : mixed
Parameters
$user : mixed
Return values
mixed

fetchMusername()

fetches the proper username markup and title

public static fetchMusername(array<string|int, mixed> &$user[, string $displaygroupfield = 'displaygroupid' ][, string $usernamefield = 'username' ]) : string
Parameters
$user : array<string|int, mixed>

(ref) User info array

$displaygroupfield : string = 'displaygroupid'

Name of the field representing displaygroupid in the User info array

$usernamefield : string = 'username'

Name of the field representing username in the User info array

Return values
string

Username with markup and title

fetchUserinfo()

Fetches an array containing info for the specified user, or false if user is not found

public static fetchUserinfo(mixed $userid[, mixed $option = array() ][, mixed $languageid = false ][, mixed $nocache = false ]) : array<string|int, mixed>

Values for Option parameter: avatar - Get avatar admin - Join the administrator table to get various admin options signpic - Join the sigpic table to get the userid just to check if we have a picture usercss - Get user's custom CSS isfriend - Is the logged in User a friend of this person? Therefore: array('avatar', 'location') means 'Get avatar' and 'Process online location'

Parameters
$userid : mixed
$option : mixed = array()
$languageid : mixed = false
$nocache : mixed = false
Return values
array<string|int, mixed>

The information for the requested user

getUserInfoByCredential()

Obtains user info depending on the login credentials method.

public static getUserInfoByCredential( $credential) : mixed
Parameters
$credential :
Return values
mixed

processLogout()

Logs the current user out

public static processLogout() : info

This function does not remove the session cookies

Return values
info

array: sessionhash -- hash identifying the new session apiaccesstoken -- the current api access token, if this is a request through MAPI

processNewLogin()

Processes logins into CP Adapted from functions_login.php::process_new_login THIS METHOD DOES NOT SET ANY COOKIES, SO IT CANNOT REPLACE DIRECTLY THE LEGACY FUNCTION

public static processNewLogin(array<string|int, mixed> $auth[, string $logintype = '' ]) : array<string|int, mixed>
Parameters
$auth : array<string|int, mixed>

The userinfo returned by vB_User::verifyAuthentication()

$logintype : string = ''

Currently 'cplogin' only or empty

Tags
static
Return values
array<string|int, mixed>

The info returned by vB_User::verifyAuthentication() with the addition of sessionhash -- hash identifying the new session cpsessionhash -- the hash for the cp session (only present if the user is an admin or a mod)

setAdminCss()

public static setAdminCss(mixed $userid, mixed $cssprefs) : mixed
Parameters
$userid : mixed
$cssprefs : mixed
Return values
mixed

setGroupInTopic()

This grants a user additional permissions in a specific channel, by adding to the groupintopic table

public static setGroupInTopic(mixed $userid, mixed $nodeids, mixed $usergroupid) : bool
Parameters
$userid : mixed
$nodeids : mixed
$usergroupid : mixed
Return values
bool

verifySecurityToken()

Verifies a security token is valid

public static verifySecurityToken(mixed $request_token, mixed $user_token) : bool
Parameters
$request_token : mixed
$user_token : mixed
Return values
bool

True if the hash matches and is within the correct TTL

verifyStrikeStatus()

Verifies that the user hasn't exceeded the strike total for attempted logins. Based both on user name and IP address.

public static verifyStrikeStatus([string $username = '' ]) : mixed
Parameters
$username : string = ''
Return values
mixed

cacheUserLocal()

private static cacheUserLocal(mixed $userid, mixed $optionKey, mixed $user) : mixed
Parameters
$userid : mixed
$optionKey : mixed
$user : mixed
Return values
mixed

censorUserData()

private static censorUserData(mixed &$userInfo) : mixed
Parameters
$userInfo : mixed
Return values
mixed

Search results