diff --git a/src/controllers/02-user-controller.ts b/src/controllers/02-user-controller.ts index ef94fc7..6b6b7fa 100644 --- a/src/controllers/02-user-controller.ts +++ b/src/controllers/02-user-controller.ts @@ -385,6 +385,7 @@ export class UserController extends Controller { const userId = await createUser(username, username, { firstName: body.firstName, lastName: body.lastName, + email: body.email, requiredActions: ["UPDATE_PASSWORD"], enabled: rest.status !== "INACTIVE", }); @@ -553,7 +554,11 @@ export class UserController extends Controller { } if (body.username) { - await editUser(userId, { username: body.username, enabled: body.status !== "INACTIVE" }); + await editUser(userId, { + username: body.username, + email: body.email, + enabled: body.status !== "INACTIVE", + }); } const { provinceId, districtId, subDistrictId, branchId, ...rest } = body;