Documentation

Record extends BaseAction
in package

Webservice standard container - Get user record detail class.

Table of Contents

$allowedHeaders  : array<string|int, mixed>
$allowedMethod  : array<string|int, string>
$controller  : Controller
$recordModel  : Users_Record_Model
$responseType  : string
$userData  : array<string|int, mixed>
checkAction()  : void
Check called action.
get()  : array<string|int, mixed>
Get user detail.
getLanguage()  : string
Get current language.
getParentCrmId()  : int|null
Get parent record.
getPermissionType()  : int
Get permission type.
getUserCrmId()  : int
Get crmid for portal user.
getUserData()  : mixed
Get user data and session data.
getUserStorageId()  : int
Get user storage ID.
post()  : array<string|int, mixed>
Create record.
preProcess()  : mixed
Pre process function.
setAllUserData()  : void
Set user data.
setUserData()  : void
Set user data.
updateSession()  : void
Update user session.
updateUser()  : void
Update user data.
checkLifetimeSession()  : void
Check lifetime user session.
checkPermission()  : void
Check permission to method.
checkPermissionToModule()  : void
Check permission to module.
loadSession()  : void
Load user session data .

Properties

$allowedHeaders

public array<string|int, mixed> $allowedHeaders = []

Allowed headers

$allowedMethod

public array<string|int, string> $allowedMethod = ['GET', 'POST']

Allowed methods

$recordModel

public Users_Record_Model $recordModel

User record model.

$responseType

public string $responseType = 'data'

Response data type.

$userData

private array<string|int, mixed> $userData = []

User data

Methods

checkAction()

Check called action.

public checkAction() : void
Tags
throws
Exception
Return values
void

get()

Get user detail.

public get() : array<string|int, mixed>
Tags
OA\Get

( path="/webservice/WebserviceStandard/Users/Record/{userId}", description="Gets details about the user", summary="Data for the user", tags={"Users"}, security={{"basicAuth" : }, "ApiKeyAuth" : }, "token" : }}}, operationId="getUser", @OA\Parameter( name="userId", description="User id", @OA\Schema(type="integer"), in="path", example=116, required=true ), @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true), @OA\Parameter(name="x-raw-data", in="header", @OA\Schema(type="integer", enum={0, 1}), description="Gets raw data", required=false, example=1), @OA\Response( response=200, description="Gets data for the user", @OA\JsonContent(ref="#/components/schemas/Users_Get_Record_Response"), @OA\XmlContent(ref="#/components/schemas/Users_Get_Record_Response"), ), @OA\Response( response=403, description="Access denied, access for administrators only", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), @OA\Response( response=404, description="User doesn't exist", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), ),

OA\Schema

( schema="Users_Get_Record_Response", title="Users module - Response body for user", type="object", @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"), @OA\Property( property="result", description="User data", type="object", @OA\Property(property="name", description="User label", type="string", example="System Admin"), @OA\Property(property="id", description="User Id", type="integer", example=1), @OA\Property(property="fields", type="object", title="System field names and field labels", example={"field_name_1" : "Field label 1", "field_name_2" : "Field label 2"}, @OA\AdditionalProperties(type="string", description="Field label"), ), @OA\Property( property="data", description="User data", type="object", ), @OA\Property( property="privileges", description="Parameters determining checking of editing rights and moving to the trash", type="object", @OA\Property(property="isEditable", description="Check if user is editable", type="boolean", example=true), @OA\Property(property="moveToTrash", description="Permission to delete", type="boolean", example=false), ), @OA\Property(property="rawData", description="Raw user data", type="object"), ), ),

Return values
array<string|int, mixed>

getLanguage()

Get current language.

public getLanguage() : string
Return values
string

getParentCrmId()

Get parent record.

public getParentCrmId() : int|null
Tags
throws
Exception
Return values
int|null

getPermissionType()

Get permission type.

public getPermissionType() : int
Return values
int

getUserCrmId()

Get crmid for portal user.

public getUserCrmId() : int
Return values
int

getUserData()

Get user data and session data.

public getUserData(string $key[, string $param = '' ]) : mixed
Parameters
$key : string
$param : string = ''
Return values
mixed

getUserStorageId()

Get user storage ID.

public getUserStorageId() : int
Return values
int

post()

Create record.

public post() : array<string|int, mixed>
Tags
OA\Post

( path="/webservice/WebserviceStandard/Users/Record", description="Create new user", summary="Create user", tags={"Users"}, security={{"basicAuth" : }, "ApiKeyAuth" : }, "token" : }}}, @OA\RequestBody(required=true, description="Contents of the request contains an associative array with the user data.", @OA\JsonContent(ref="#/components/schemas/User_Create_Details"), @OA\XmlContent(ref="#/components/schemas/User_Create_Details"), ), @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true), @OA\Response( response=200, description="Contents of the response contains only id", @OA\JsonContent(ref="#/components/schemas/User_Post_Record_Response"), @OA\XmlContent(ref="#/components/schemas/User_Post_Record_Response"), @OA\Link(link="GetUserById", ref="#/components/links/GetUserById") ), @OA\Response( response=406, description="No input data", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), ),

OA\Schema

( schema="User_Post_Record_Response", title="User - Created user", description="Contents of the response contains only id and name", type="object", required={"status", "result"}, @OA\Property(property="status", type="integer", enum={0, 1}, description="A numeric value of 0 or 1 that indicates whether the communication is valid. 1 - success , 0 - error"), @OA\Property(property="result", type="object", title="User data", description="Created user id and name.", required={"id", "name"}, @OA\Property(property="id", type="integer", description="Id of the newly created user", example=22), @OA\Property(property="name", type="string", description="Id of the newly created user", example="YetiForce Name"), @OA\Property(property="skippedData", type="object", description="List of parameters passed in the request that were skipped in the write process"), ), ),

OA\Schema

( schema="User_Create_Details", title="General - User create details", description="User data in user format for create view", type="object", example={"user_name" : "tom", "first_name" : "Tom", "last_name" : "Kowalski", "roleid" : "H38", "password" : "MyFunP@ssword", "confirm_password" : "MyFunP@ssword", "email1" : "my@email.com", "language" : "en-US"}, ),

OA\Link

( link="GetUserById", description="The id value returned in the response can be used as the userId parameter in GET /webservice/Users/Record/{userId}.", operationId="getUser", parameters={ "recordId" = "$response.body#/result/id" } )

Return values
array<string|int, mixed>

preProcess()

Pre process function.

public preProcess() : mixed
Return values
mixed

setAllUserData()

Set user data.

public setAllUserData(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>
Return values
void

setUserData()

Set user data.

public setUserData(string $key, mixed $value) : void
Parameters
$key : string
$value : mixed
Return values
void

updateSession()

Update user session.

public updateSession([array<string|int, mixed> $data = [] ]) : void
Parameters
$data : array<string|int, mixed> = []
Return values
void

updateUser()

Update user data.

public updateUser([array<string|int, mixed> $data = [] ]) : void
Parameters
$data : array<string|int, mixed> = []
Return values
void

checkLifetimeSession()

Check lifetime user session.

protected checkLifetimeSession() : void
Tags
throws
Exception
Return values
void

checkPermission()

Check permission to method.

protected checkPermission() : void
Return values
void

checkPermissionToModule()

Check permission to module.

protected checkPermissionToModule() : void
Tags
throws
Exception
Return values
void

loadSession()

Load user session data .

protected loadSession() : void
Tags
throws
Exception
Return values
void

        

Search results