diff --git a/packages/component-user-manager/src/routes/users/changePassword.js b/packages/component-user-manager/src/routes/users/changePassword.js index d1b49ae03fb012260a14a324a72640c1b4d48280..57c1b2b7b17826155673582772cc2578b5eb441a 100644 --- a/packages/component-user-manager/src/routes/users/changePassword.js +++ b/packages/component-user-manager/src/routes/users/changePassword.js @@ -14,7 +14,7 @@ module.exports = models => async (req, res) => { let user try { user = await models.User.find(req.user) - if (!user.validPassword(password)) { + if (!await user.validPassword(password)) { return res.status(400).json({ error: 'Wrong username or password.' }) } user.password = newPassword diff --git a/packages/components-faraday/src/components/Admin/EditUserForm.js b/packages/components-faraday/src/components/Admin/EditUserForm.js index fbf6987a803bf8d6b48058cd911b21b9bd6f14c8..6924e021d96345f95375692b7fc4b102faa1c6b8 100644 --- a/packages/components-faraday/src/components/Admin/EditUserForm.js +++ b/packages/components-faraday/src/components/Admin/EditUserForm.js @@ -17,7 +17,7 @@ const EditUserForm = ({ {subtitle && <Subtitle>{subtitle}</Subtitle>} <Row> <RowItem> - <Label> First name*1 </Label> + <Label> First name* </Label> <ValidatedField component={TextField} name="firstName" @@ -70,9 +70,9 @@ const EditUserForm = ({ component={input => ( <Checkbox checked={input.value} + label="Editor in Chief" type="checkbox" {...input} - label="Editor in Chief" /> )} name="editorInChief" @@ -81,9 +81,9 @@ const EditUserForm = ({ component={input => ( <Checkbox checked={input.value} + label="Handling Editor" type="checkbox" {...input} - label="Handling Editor" /> )} name="handlingEditor" @@ -92,9 +92,9 @@ const EditUserForm = ({ component={input => ( <Checkbox checked={input.value} + label="Admin" type="checkbox" {...input} - label="Admin" /> )} name="admin"