Documentation

Users extends CRMEntity
in package

Main class for the user module.

Table of Contents

$additional_column_fields  : mixed
$authenticated  : mixed
$default_order_by  : mixed
$default_sort_order  : mixed
$default_widgets  : mixed
$deleted  : mixed
$emailTemplate_defaultFields  : mixed
$encodeFields  : mixed
$error_string  : mixed
$id  : mixed
$is_admin  : mixed
$list_fields_name  : mixed
$list_mode  : mixed
$module_name  : mixed
$new_schema  : mixed
$object_name  : mixed
$popup_fields  : mixed
$popup_type  : mixed
$record_id  : mixed
$search_fields  : mixed
$search_fields_name  : mixed
$tab_name  : mixed
$tab_name_index  : array<string|int, mixed>
$table_index  : mixed
$table_name  : mixed
$tableJoinClause  : array<string|int, string>
$user_preferences  : mixed
__construct()  : mixed
constructor function for the main user class.
createAccessKey()  : mixed
getActiveAdminId()  : int
Function to get the user if of the active admin user.
getActiveAdminUser()  : Users
Function to get the active admin user object.
getInstance()  : self
Get CRMEntity instance.
getJoinClause()  : string
Get table join clause by table name.
getLockFields()  : array<string|int, mixed>
Gets fields to locking record.
isAdminUser()  : bool
Function to check whether the user is an Admin user.
moduleHandler()  : mixed
Invoked when special actions are performed on the module.
retrieveCurrentUserInfoFromFile()  : mixed
Function to get the current user information from the user_privileges file.
retrieveEntityInfo()  : mixed
Retrieve record information of the module.
setRelationTables()  : array<string|int, mixed>
Function to get the relation tables for related modules.
trackLinkedInfo()  : mixed
Function to track when a new record is linked to a given record.
trackUnLinkedInfo()  : mixed
Function to track when a record is unlinked to a given record.
transformOwnerShipAndDelete()  : mixed
Transform owner ship and delete.
createColumnAliasForField()  : string
Function returns the column alias for a field.
init()  : void
Loading the system configuration.

Properties

$additional_column_fields

public mixed $additional_column_fields = ['reports_to_name']

$authenticated

public mixed $authenticated = \false

$default_order_by

public mixed $default_order_by = ''

$default_sort_order

public mixed $default_sort_order = 'ASC'

$default_widgets

public mixed $default_widgets = ['CVLVT', 'UA']

$deleted

public mixed $deleted

$emailTemplate_defaultFields

public mixed $emailTemplate_defaultFields = ['first_name', 'last_name', 'title', 'department', 'phone_home', 'phone_mobile', 'signature', 'email1']

$encodeFields

public mixed $encodeFields = ['first_name', 'last_name', 'description']

$error_string

public mixed $error_string

$is_admin

public mixed $is_admin

$list_fields_name

public mixed $list_fields_name = ['First Name' => 'first_name', 'Last Name' => 'last_name', 'Role Name' => 'roleid', 'User Name' => 'user_name', 'Status' => 'status', 'Admin' => 'is_admin', 'Login Method' => 'login_method', 'FL_FORCE_PASSWORD_CHANGE' => 'force_password_change', 'FL_DATE_PASSWORD_CHANGE' => 'date_password_change']

$list_mode

public mixed $list_mode

$module_name

public mixed $module_name = 'Users'

$new_schema

public mixed $new_schema = \true

$object_name

public mixed $object_name = 'User'

$popup_fields

public mixed $popup_fields = ['last_name']

$popup_type

public mixed $popup_type

$record_id

public mixed $record_id

$search_fields

public mixed $search_fields = ['Name' => ['vtiger_users' => 'last_name'], 'Email' => ['vtiger_users' => 'email1']]

$search_fields_name

public mixed $search_fields_name = ['First Name' => 'first_name', 'Name' => 'last_name', 'Email' => 'email1']

$tab_name

public mixed $tab_name = ['vtiger_users', 'vtiger_user2role']

$tab_name_index

public array<string|int, mixed> $tab_name_index = ['vtiger_users' => 'id', 'vtiger_user2role' => 'userid']

$table_index

public mixed $table_index = 'id'

$table_name

public mixed $table_name = 'vtiger_users'

$tableJoinClause

public array<string|int, string> $tableJoinClause = ['vtiger_entity_stats' => 'LEFT JOIN', 'u_yf_openstreetmap' => 'LEFT JOIN', 'u_yf_wapro_records_map' => 'LEFT JOIN']

Tables join clause.

$user_preferences

public mixed $user_preferences

Methods

__construct()

constructor function for the main user class.

public __construct() : mixed
Return values
mixed

createAccessKey()

public createAccessKey() : mixed
Return values
mixed

getActiveAdminId()

Function to get the user if of the active admin user.

public static getActiveAdminId() : int
Return values
int
  • Active Admin User ID

getActiveAdminUser()

Function to get the active admin user object.

public static getActiveAdminUser() : Users
Return values
Users
  • Active Admin User Instance

getInstance()

Get CRMEntity instance.

public static getInstance(string $module) : self
Parameters
$module : string
Return values
self

getJoinClause()

Get table join clause by table name.

public getJoinClause(string $tableName) : string
Parameters
$tableName : string
Return values
string

getLockFields()

Gets fields to locking record.

public getLockFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

isAdminUser()

Function to check whether the user is an Admin user.

public isAdminUser() : bool
Return values
bool

true/false

moduleHandler()

Invoked when special actions are performed on the module.

public moduleHandler(string $moduleName, string $eventType) : mixed
Parameters
$moduleName : string

Module name

$eventType : string

Event Type (module.postinstall, module.disabled, module.enabled, module.preuninstall)

Return values
mixed

retrieveCurrentUserInfoFromFile()

Function to get the current user information from the user_privileges file.

public retrieveCurrentUserInfoFromFile( $userid) : mixed
Parameters
$userid :

-- user id:: Type integer

Tags
returns

user info in $this->column_fields array:: Type array

Return values
mixed

retrieveEntityInfo()

Retrieve record information of the module.

public retrieveEntityInfo(int $record, string $module) : mixed
Parameters
$record : int
  • crmid of record
$module : string
  • module name
Return values
mixed

setRelationTables()

Function to get the relation tables for related modules.

public setRelationTables([string $secModule = false ]) : array<string|int, mixed>
Parameters
$secModule : string = false
  • $secmodule secondary module name
Return values
array<string|int, mixed>

returns the array with table names and fieldnames storing relations between module and this module

trackLinkedInfo()

Function to track when a new record is linked to a given record.

public static trackLinkedInfo(mixed $crmId) : mixed
Parameters
$crmId : mixed
Return values
mixed

trackUnLinkedInfo()

Function to track when a record is unlinked to a given record.

public trackUnLinkedInfo(int $crmId) : mixed
Parameters
$crmId : int
Return values
mixed

transformOwnerShipAndDelete()

Transform owner ship and delete.

public transformOwnerShipAndDelete(int $userId, array<string|int, mixed> $transformToUserId) : mixed
Parameters
$userId : int
$transformToUserId : array<string|int, mixed>
Return values
mixed

createColumnAliasForField()

Function returns the column alias for a field.

protected createColumnAliasForField(array<string|int, mixed> $fieldInfo) : string
Parameters
$fieldInfo : array<string|int, mixed>
  • field information
Return values
string

field value

init()

Loading the system configuration.

protected init() : void
Return values
void

        

Search results