[FIX]Update profile name (#4513)
This commit is contained in:
parent
92a63e6a39
commit
aefb60b5d2
|
@ -1,7 +1,8 @@
|
|||
import React from 'react';
|
||||
|
||||
export interface IProfileParams {
|
||||
name: string;
|
||||
realname?: string;
|
||||
name?: string;
|
||||
username: string;
|
||||
email: string | null;
|
||||
newPassword: string;
|
||||
|
|
|
@ -226,7 +226,7 @@ class ProfileView extends React.Component<IProfileViewProps, IProfileViewState>
|
|||
|
||||
// Name
|
||||
if (user.name !== name) {
|
||||
params.name = name;
|
||||
params.realname = name;
|
||||
}
|
||||
|
||||
// Username
|
||||
|
@ -295,6 +295,8 @@ class ProfileView extends React.Component<IProfileViewProps, IProfileViewState>
|
|||
|
||||
if (result) {
|
||||
logEvent(events.PROFILE_SAVE_CHANGES);
|
||||
params.name = params.realname;
|
||||
delete params.realname;
|
||||
if (customFields) {
|
||||
dispatch(setUser({ customFields, ...params }));
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue