Update packages/core/admin/server/controllers/authenticated-user.js

This commit is contained in:
Alexandre BODIN 2021-10-21 15:31:05 +02:00 committed by GitHub
parent 09b83c55f8
commit bd5a1106e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ module.exports = {
const userService = getService('user');
const authServer = getService('auth');
const { currentPassword, ...userInfo } = ctx.request.body;
const { currentPassword, ...userInfo } = input;
if (currentPassword && userInfo.password) {
const isValid = await authServer.validatePassword(currentPassword, ctx.state.user.password);