class vB_User

Traits

Properties

static protected $users

Methods

__sleep()

No description

__wakeup()

No description

static array
processNewLogin($auth, $logintype = '')

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

static 
setAdminCss($userid, $cssprefs)

No description

static boolean
verifySecurityToken(string $request_token, string $user_token)

Verifies a security token is valid

static info
processLogout()

Logs the current user out

static 
verifyStrikeStatus(string $username = '')

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

static 
execStrikeUser($username = '')

No description

static 
execUnstrikeUser($username)

No description

static array
fetchUserinfo(integer $userid = 0, array $option = array(), integer $languageid = false, boolean $nocache = false)

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

static 
calcUsertimeDiff($userinfo)

No description

static string
fetchMusername(array $user, string $displaygroupfield = 'displaygroupid', string $usernamefield = 'username')

fetches the proper username markup and title

static bool
setGroupInTopic($userid, $nodeids, $usergroupid)

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

static 
clearUsersCache($userid)

Clears user cached information.

static mixed
getUserInfoByCredential($credential)

Obtains user info depending on the login credentials method.

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

at line 31
static array processNewLogin($auth, $logintype = '')

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

Parameters

$auth
$logintype

Return Value

array 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)

at line 116
static setAdminCss($userid, $cssprefs)

Parameters

$userid
$cssprefs

at line 146
static boolean verifySecurityToken(string $request_token, string $user_token)

Verifies a security token is valid

Parameters

string $request_token Security token from the REQUEST data
string $user_token Security token used in the hash

Return Value

boolean True if the hash matches and is within the correct TTL

at line 192
static info processLogout()

Logs the current user out

Adapted from functions_login::process_logout IT DOES NOT REMOVE COOKIES

Return Value

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

at line 280
static verifyStrikeStatus(string $username = '')

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

Parameters

string $username

at line 319
static execStrikeUser($username = '')

Parameters

$username

at line 389
static execUnstrikeUser($username)

Parameters

$username

at line 420
static array fetchUserinfo(integer $userid = 0, array $option = array(), integer $languageid = false, boolean $nocache = false)

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

Values for Option parameter: avatar - Get avatar profilepic - Join the customprofilpic table to get the userid just to check if we have a picture 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

integer $userid User ID
array $option Fetch Option (see description)
integer $languageid Language ID. If set to 0, it will use user-set languageid (if exists) or default languageid
boolean $nocache If true, the method won't use user cache but fetch information from DB.

Return Value

array The information for the requested user

at line 610
static calcUsertimeDiff($userinfo)

Parameters

$userinfo

at line 631
static string fetchMusername(array $user, string $displaygroupfield = 'displaygroupid', string $usernamefield = 'username')

fetches the proper username markup and title

Parameters

array $user (ref) User info array
string $displaygroupfield Name of the field representing displaygroupid in the User info array
string $usernamefield Name of the field representing username in the User info array

Return Value

string Username with markup and title

at line 690
static bool setGroupInTopic($userid, $nodeids, $usergroupid)

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

Parameters

$userid
$nodeids
$usergroupid

Return Value

bool

at line 743
static clearUsersCache($userid)

Clears user cached information.

Parameters

$userid

at line 755
static mixed getUserInfoByCredential($credential)

Obtains user info depending on the login credentials method.

Parameters

$credential

Return Value

mixed