Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion client/views/account/AccountProfilePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const AccountProfilePage = () => {
statusText,
statusType,
customFields,
confirmationPassword,
bio,
nickname,
} = values;
Expand All @@ -123,7 +124,9 @@ const AccountProfilePage = () => {
{
...(allowRealNameChange && { realname }),
...(allowEmailChange && getUserEmailAddress(user) !== email && { email }),
...(allowPasswordChange && { newPassword: password }),
...(allowPasswordChange && {
newPassword: password === confirmationPassword ? password : '',
}),
...(canChangeUsername && { username }),
...(allowUserStatusMessageChange && { statusText }),
...(typedPassword && { typedPassword: SHA256(typedPassword) }),
Expand Down Expand Up @@ -157,6 +160,7 @@ const AccountProfilePage = () => {
canChangeUsername,
email,
password,
confirmationPassword,
realname,
statusText,
username,
Expand Down