/user/update

Exports the [user] update method for the /api/user/cookie route.

Requires

Methods

(inner) update(req, res)

The update method will send a request to the ACL to update a user record in the ACL.

The user object to update can be provided as request body.

Property values to be updated must be provided as a substitutes array to prevent SQL injection.

The update_user keys must be validated to contain white listed characters only to prevent SQL injection.

Parameters:
NameTypeDescription
reqreq

HTTP request.

resreq

HTTP response.

Properties
NameTypeAttributesDescription
req.bodyObject<optional>

HTTP Post request body containing the update information.

req.paramsObject

HTTP request parameter.

params.emailstring

User to update

params.fieldstring

User record field to update

params.valuestring

Update value for user record field.

params.userObject

Requesting user.

user.adminboolean

Requesting user is admin.