diff --git a/src/helpers/get-user-data.ts b/src/helpers/get-user-data.ts index 28e9140..ab79a39 100644 --- a/src/helpers/get-user-data.ts +++ b/src/helpers/get-user-data.ts @@ -97,6 +97,16 @@ export function getUserData ( const user = checkOneUser(users); + if (typeof user.verifyChanges === "string") { + try { + user.verifyChanges = JSON.parse(user.verifyChanges); + } catch (e) { + throw new Error( + "Cannot parse user.verifyChanges string field. Incorrect JSON string provided: " + user.verifyChanges + ); + } + } + checkUserChecks(user, checks); return user;