Bitrix API

User extends BaseObject

Table of Contents

Constants

SYSTEM_USER_ID  = 0

Properties

$instance  : mixed
$usersIds  : mixed

Methods

__construct()  : mixed
canEdit()  : bool
canRead()  : bool
getApplication()  : CMain
getCookieId()  : int
getCurrent()  : User
getErrorByCode()  : Error|null
getErrors()  : array<string|int, Error>
getId()  : int
getUser()  : CUser
getVotedUserId()  : int
init()  : void
exists only for child class
isUserVotedFor()  : bool|int
isVotedFor()  : bool|int
loadFromId()  : BaseObject
loadUserGroups()  : array<string|int, mixed>
lock()  : bool
onUserLogin()  : mixed
setCookieId()  : void
setVotedUserId()  : int
shutdown()  : mixed
Debug function
unlock()  : mixed

Constants

SYSTEM_USER_ID

public mixed SYSTEM_USER_ID = 0

Properties

$instance

public static mixed $instance = null

$usersIds

public static mixed $usersIds = []

Methods

__construct()

public __construct(mixed $id) : mixed
Parameters
$id : mixed

canEdit()

public canEdit(int $userId) : bool
Parameters
$userId : int

User ID.

Return values
bool

canRead()

public canRead(int $userId) : bool
Parameters
$userId : int

User ID.

Return values
bool

getCookieId()

public getCookieId() : int
Return values
int

getCurrent()

public static getCurrent() : User
Return values
User

getErrorByCode()

public getErrorByCode(string|int $code) : Error|null
Parameters
$code : string|int

The code of the error.

Tags
inheritdoc

Returns an error with the necessary code.

Return values
Error|null

getVotedUserId()

public getVotedUserId() : int
Return values
int

init()

exists only for child class

public init() : void
Tags
throws
ArgumentException

isUserVotedFor()

public static isUserVotedFor(int $voteId, int $userId) : bool|int
Parameters
$voteId : int

Vote ID.

$userId : int

User ID.

Return values
bool|int

isVotedFor()

public isVotedFor(int $voteId) : bool|int
Parameters
$voteId : int

Vote ID.

Return values
bool|int

loadFromId()

public static loadFromId(int $id[, bool $shouldBeNewIfIdIsNull = false ]) : BaseObject
Parameters
$id : int

Entity ID.

$shouldBeNewIfIdIsNull : bool = false
Return values
BaseObject

loadUserGroups()

public static loadUserGroups(int $userId) : array<string|int, mixed>
Parameters
$userId : int

User ID.

Return values
array<string|int, mixed>

lock()

public lock(int $voteId) : bool
Parameters
$voteId : int
Return values
bool

onUserLogin()

public static onUserLogin() : mixed

setCookieId()

public setCookieId(mixed $id) : void
Parameters
$id : mixed

setVotedUserId()

public setVotedUserId([null $incrementCount = null ]) : int
Parameters
$incrementCount : null = null

If true - increment, in false - decrement, null - no changes.

Return values
int

shutdown()

Debug function

public static shutdown() : mixed

unlock()

public unlock(int $voteId) : mixed
Parameters
$voteId : int

        
On this page

Search results