CoolCMS API

ResetFormTrait

Second step of "lost password": the visitor opened the e-mailed link (`?email=…&key=…` on the "Lost password" page) and chooses a new password.

The component only forwards the pair from the link plus the new password; the key check, the write and the consumption of the key happen in Api\…\UserManager::resetPassword(). The pair travels in hidden fields, so a failed validation round trip keeps it even when the form action drops the query string.

Table of Contents

Methods

isResetRequest()  : bool
Did the visitor come from the reset link (both parameters present)?
onResetSuccess()  : void
createComponentResetForm()  : Form
getResetEmail()  : string
getResetKey()  : string
readResetParameter()  : string
The link parameters arrive in the query (GET) and in the hidden fields (POST).
toFormString()  : string

Methods

isResetRequest()

Did the visitor come from the reset link (both parameters present)?

public isResetRequest() : bool
Return values
bool

getResetEmail()

private getResetEmail() : string
Return values
string

getResetKey()

private getResetKey() : string
Return values
string

readResetParameter()

The link parameters arrive in the query (GET) and in the hidden fields (POST).

private readResetParameter(string $name) : string
Parameters
$name : string
Return values
string

toFormString()

private static toFormString(mixed $value) : string
Parameters
$value : mixed
Return values
string
On this page

Search results