User
Table of Contents
Methods
- clearLastUsedEngineCode() : void
- Drop last used engine by current user - will use default
- clearLastUsedEngineCodeForAll() : void
- Drop last used engine for all user - will use default
- getCurrentUserId() : int
- Returns current user id.
- getInstance() : CUser
- Returns main module's USER instance.
- getLastUsedEngineCode() : string
- Returns last used engine code in category.
- getLastUsedRoleCode() : string
- Returns last used role code in category.
- getUserDataById() : array<string|int, mixed>
- Returns user data by userId.
- getUserLanguage() : string
- Returns User's Language.
- isAdmin() : bool
- Returns true if current user is admin.
- setLastUsedEngineCode() : void
- Sets specified engine as last used by current user.
- setLastUsedRoleCode() : void
- Sets specified role as last used by current user.
Methods
clearLastUsedEngineCode()
Drop last used engine by current user - will use default
public
static clearLastUsedEngineCode(string $category) : void
Parameters
- $category : string
-
Engine category code.
clearLastUsedEngineCodeForAll()
Drop last used engine for all user - will use default
public
static clearLastUsedEngineCodeForAll(string $category[, string $moduleId = 'default' ]) : void
Parameters
- $category : string
-
Engine category code.
- $moduleId : string = 'default'
getCurrentUserId()
Returns current user id.
public
static getCurrentUserId() : int
Return values
intgetInstance()
Returns main module's USER instance.
public
static getInstance() : CUser
Return values
CUsergetLastUsedEngineCode()
Returns last used engine code in category.
public
static getLastUsedEngineCode(string $category, string $moduleId) : string
Parameters
- $category : string
-
Engine category code.
- $moduleId : string
Return values
stringgetLastUsedRoleCode()
Returns last used role code in category.
public
static getLastUsedRoleCode(string $category, string $moduleId) : string
Parameters
- $category : string
-
Engine category code.
- $moduleId : string
Return values
stringgetUserDataById()
Returns user data by userId.
public
static getUserDataById(int $userId) : array<string|int, mixed>
Parameters
- $userId : int
Return values
array<string|int, mixed>getUserLanguage()
Returns User's Language.
public
static getUserLanguage() : string
Return values
stringisAdmin()
Returns true if current user is admin.
public
static isAdmin() : bool
Return values
boolsetLastUsedEngineCode()
Sets specified engine as last used by current user.
public
static setLastUsedEngineCode(Engine $engine) : void
Parameters
- $engine : Engine
-
Engine instance.
setLastUsedRoleCode()
Sets specified role as last used by current user.
public
static setLastUsedRoleCode(Engine $engine) : void
Parameters
- $engine : Engine
-
Engine instance.