diff --git a/app/definitions/IProfile.ts b/app/definitions/IProfile.ts index f75885c09..d232672cb 100644 --- a/app/definitions/IProfile.ts +++ b/app/definitions/IProfile.ts @@ -1,7 +1,8 @@ import React from 'react'; export interface IProfileParams { - name: string; + realname?: string; + name?: string; username: string; email: string | null; newPassword: string; diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index c428a0d4e..f07e97ab2 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -226,7 +226,7 @@ class ProfileView extends React.Component // Name if (user.name !== name) { - params.name = name; + params.realname = name; } // Username @@ -295,6 +295,8 @@ class ProfileView extends React.Component if (result) { logEvent(events.PROFILE_SAVE_CHANGES); + params.name = params.realname; + delete params.realname; if (customFields) { dispatch(setUser({ customFields, ...params })); } else {