Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix : User is not able to change the account password. #19857

Closed
salahtobok opened this issue Dec 15, 2020 · 1 comment
Closed

Fix : User is not able to change the account password. #19857

salahtobok opened this issue Dec 15, 2020 · 1 comment

Comments

@salahtobok
Copy link

Regarding to issue in updating profile details in AccountProfilePage (password, email) already declared by some users such us : #19604 , #6226 , #10730

To resolve the issue saveuserprofile error: invalid password I suggest this solution :

  1. For server version of RocketChat append xe method that is exist in Rocket.Chat/programs/web.browser/dynamic/client/account/AccountProfilePage.js file with the following code :
, t = b("Are_you_sure");
				return R(I ? () => u.createElement(U, {
					onSave: e,
					onCancel: H,
					title: t,
					text: b("For_your_security_you_must_enter_your_current_password_to_continue"),
					isPassword: !0
				}) : () => u.createElement(U, {
					onSave: e,
					onCancel: H,
					title: t,
					text: b("If_you_are_sure_type_in_your_username"),
					isPassword: !0
				}))

and add the following dependencies H, I, R to the last method like this [G, J, K, z, V, we, re, ie, _e, ue, he, me, P, ke, ye, S, b, ve, ge, O, Ce, Ae, pe, H, I, R])

  1. For GitHub repository version of RocketChat append onSave method that is exist in Rocket.Chat/client/views/account/AccountProfilePage.js file with the following code :
const title = t('Are_you_sure');
		if (localPassword) {
			return setModal(() => <ActionConfirmModal
				onSave={save}
				onCancel={closeModal}
				title={title}
				text={t('For_your_security_you_must_enter_your_current_password_to_continue')}
				isPassword
			/>);
		}
		return setModal(() => <ActionConfirmModal
			onSave={save}
			onCancel={closeModal}
			title={title}
			text={t('If_you_are_sure_type_in_your_username')}
			isPassword
		/>);

and add the following dependencies closeModal,localPassword,setModal to the last method like this
[
saveFn,
allowEmailChange,
allowPasswordChange,
allowRealNameChange,
allowUserStatusMessageChange,
bio,
canChangeUsername,
email,
password,
realname,
statusText,
username,
user,
updateAvatar,
handleAvatar,
dispatchToastMessage,
t,
customFields,
statusType,
commit,
nickname,
handlePassword,
handleConfirmationPassword,
closeModal,
localPassword,
setModal

]

Modified files :

  1. For GitHub repository version of RocketChat

AccountProfilePage.zip

  1. For Server version of RocketChat

AccountProfilePage.zip

@close-issue-app
Copy link

This issue was closed because it does not use our bug report issue template.

Please make sure to use it and fill it as much as you can so we can provide better and faster support.

The following sections must not be removed, or else the BOT will close it immediately again:

  • Steps to reproduce
  • Expected behavior
  • Actual behavior
  • Server Setup Information
  • Version of Rocket.Chat Server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant