diff --git a/src/controllers/02-user-controller.ts b/src/controllers/02-user-controller.ts index 7c34b48..f5ddbde 100644 --- a/src/controllers/02-user-controller.ts +++ b/src/controllers/02-user-controller.ts @@ -642,11 +642,13 @@ export class UserController extends Controller { } } - if (body.username) { + if (body.username || body.email || body.firstName || body.lastName) { await editUser(userId, { + firstName: body.firstName, + lastName: body.lastName, username: body.username, email: body.email, - enabled: body.status !== "INACTIVE", + enabled: body.status ? body.status !== "INACTIVE" : undefined, }); } else if (body.status) { await editUser(userId, { enabled: body.status !== "INACTIVE" });