/user/verify
Exports the [user] verify method for the /api/user/verify route.
- Source
Requires
- module:/user/acl
- module:/user/login
- module:/utils/mailer
- module:/utils/languageTemplates
- module:/utils/processEnv
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]
| Name | Type | Description |
|---|---|---|
req.params | Object | Request parameter. |
params.key | string | Verification key. |
params.language | string | Request messaging language. |
params.adminList | array | | Request paramater string will be parsed as array if defined in []. |
- Source