/user/verify

Exports the [user] verify method for the /api/user/verify route.

Requires

Methods

(async, inner) verify(req, res)

Attemps to find a user record with matching params.key verificationtoken.

Update failedattempts=0, verified=true, and password=passwordreset in the user record.

The verification token can only be used once and will be nulled in the ACL.

An email will be sent to all admin accounts requesting approval of the newly verified user account.

The adminList parameter can be used to limit the administrators to be contacted for user approval.

eg. adminList=dennis@geolytix.co.uk

Request parameter will be parsed as an array if defined with brackets.

eg. adminList=[dennis@geolytix.co.uk,robert@geolytix.co.uk]

Parameters:
NameTypeDescription
reqreq

HTTP request.

resres

HTTP response.

Properties
NameTypeDescription
req.paramsObject

Request parameter.

params.keystring

Verification key.

params.languagestring

Request messaging language.

params.adminListarray | string

Request paramater string will be parsed as array if defined in [].