User extends Intranet
FinalYes
Table of Contents
Constants
- MODULE_NAME = 'intranet'
Methods
- getByDepartments() : array<string|int, mixed>
- getDepartmentUFCode() : string
- Returns userfield code by which users are connected with departments
- getSubordinate() : mixed
- getSubordinateSubDepartments() : mixed
- getType() : string
- isCollaber() : bool
- isDirector() : bool
- Checks if a given user is a director (has subordinate users or departments)
- isEmail() : bool
- isIntranet() : bool
Constants
MODULE_NAME
public
mixed
MODULE_NAME
= 'intranet'
Methods
getByDepartments()
public
static getByDepartments(array<string|int, mixed> $departmentsIds[, array<string|int, mixed> $fields = ['ID', 'UF_DEPARTMENT'] ][, mixed $withFired = false ]) : array<string|int, mixed>
Parameters
- $departmentsIds : array<string|int, mixed>
- $fields : array<string|int, mixed> = ['ID', 'UF_DEPARTMENT']
- $withFired : mixed = false
Return values
array<string|int, mixed>getDepartmentUFCode()
Returns userfield code by which users are connected with departments
public
static getDepartmentUFCode() : string
Return values
stringgetSubordinate()
public
static getSubordinate([mixed $userId = 0 ][, mixed $allowedDepartments = null ][, mixed $includeSubDepartments = false ][, mixed $withFired = false ]) : mixed
Parameters
- $userId : mixed = 0
- $allowedDepartments : mixed = null
- $includeSubDepartments : mixed = false
- $withFired : mixed = false
getSubordinateSubDepartments()
public
static getSubordinateSubDepartments([mixed $userId = 0 ][, mixed $allowedDepartments = null ]) : mixed
Parameters
- $userId : mixed = 0
- $allowedDepartments : mixed = null
getType()
public
static getType(int $userId) : string
Parameters
- $userId : int
Return values
stringisCollaber()
public
static isCollaber(int $userId) : bool
Parameters
- $userId : int
Return values
boolisDirector()
Checks if a given user is a director (has subordinate users or departments)
public
static isDirector([int $userId = 0 ]) : bool
Parameters
- $userId : int = 0
Return values
boolisEmail()
public
static isEmail(int $userId) : bool
Parameters
- $userId : int
Tags
Return values
boolisIntranet()
public
static isIntranet(int $userId) : bool
Parameters
- $userId : int