Documentation

ResetPassword extends BaseAction
in package
Uses LoginHistory

Webservice standard container - User password reset action class.

Table of Contents

$allowedHeaders  : array<string|int, mixed>
$allowedMethod  : array<string|int, string>
$controller  : Controller
$responseType  : string
$userData  : array<string|int, mixed>
checkAction()  : void
Check called action.
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()  : bool
Post method.
preProcess()  : mixed
Pre process function.
put()  : bool
Put method.
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 .
saveLoginHistory()  : void
Function to store the login history.

Properties

$allowedHeaders

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

Allowed headers

$allowedMethod

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

Allowed methods

$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

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()

Post method.

public post() : bool
Tags
OA\Post

( path="/webservice/WebserviceStandard/Users/ResetPassword", description="User password reset - Generating and sending a one-time token", summary="User password reset-Generatingandsendingaone-timetoken", tags={"Users"}, security={ {"basicAuth" : }, "ApiKeyAuth" : }} }, @OA\RequestBody( required=true, description="Input data", @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Request"), @OA\MediaType( mediaType="multipart/form-data", @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request") ), @OA\MediaType( mediaType="application/x-www-form-urlencoded", @OA\Schema(ref="#/components/schemas/Users_Post_ResetPassword_Request") ), ), @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true), @OA\Response( response=200, description="Response", @OA\JsonContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"), @OA\XmlContent(ref="#/components/schemas/Users_Post_ResetPassword_Response"), ), @OA\Response( response=404, description="User with this email address does not exist", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), ),

OA\Schema

( schema="Users_Post_ResetPassword_Request", title="Users module - Users password reset request body", type="object", required={"userName"}, @OA\Property(property="userName", type="string", description="User name / email"), ),

OA\Schema

( schema="Users_Post_ResetPassword_Response", title="Users module - Users password reset response body", 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", title="Content of responses from a given method", type="object", @OA\Property(property="expirationDate", type="string", example="2019-10-07 08:32:38"), @OA\Property(property="mailerStatus", type="boolean", example=true), ), ),

Return values
bool

preProcess()

Pre process function.

public preProcess() : mixed
Return values
mixed

put()

Put method.

public put() : bool
Tags
OA\Put

( path="/webservice/WebserviceStandard/Users/ResetPassword", description="User password reset - Password change", summary="User password reset-Passwordchange", tags={"Users"}, security={ {"basicAuth" : }, "ApiKeyAuth" : }} }, @OA\RequestBody( required=true, description="Input data", @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Request"), @OA\MediaType( mediaType="multipart/form-data", @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request") ), @OA\MediaType( mediaType="application/x-www-form-urlencoded", @OA\Schema(ref="#/components/schemas/Users_Put_ResetPassword_Request") ), ), @OA\Parameter(name="X-ENCRYPTED", in="header", @OA\Schema(ref="#/components/schemas/Header-Encrypted"), required=true), @OA\Response( response=200, description="Response", @OA\JsonContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"), @OA\XmlContent(ref="#/components/schemas/Users_Put_ResetPassword_Response"), ), @OA\Response( response=404, description="User with this email address does not exist", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), @OA\Response( response=405, description="ERR_TOKEN_DOES_NOT_EXIST", @OA\JsonContent(ref="#/components/schemas/Exception"), @OA\XmlContent(ref="#/components/schemas/Exception"), ), ),

OA\Schema

( schema="Users_Put_ResetPassword_Request", title="Users module - Users password reset request body", type="object", required={"token", "password"}, @OA\Property(property="token", type="string", description="A one-time password reset token"), @OA\Property(property="password", type="string", description="New password"), ),

OA\Schema

( schema="Users_Put_ResetPassword_Response", title="Users module - Users password reset response body", 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", title="Password reset status", type="boolean", example=false, ), ),

Return values
bool

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
Return values
void

loadSession()

Load user session data .

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

saveLoginHistory()

Function to store the login history.

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

        

Search results