From 4c6ff22e64b4e6d6c995e14e100babae5d1b9b7c Mon Sep 17 00:00:00 2001 From: Artem Tarasov Date: Fri, 18 Dec 2020 17:03:34 +0300 Subject: [PATCH] Web: Client: Confirm: fix activateUser --- .../pages/Confirm/sub-components/createUser.js | 11 ++++++++--- web/ASC.Web.Client/src/store/confirm/actions.js | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/createUser.js b/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/createUser.js index 1ed1a5978f..f07d4067da 100644 --- a/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/createUser.js +++ b/web/ASC.Web.Client/src/components/pages/Confirm/sub-components/createUser.js @@ -89,7 +89,12 @@ class Confirm extends React.PureComponent { onSubmit = () => { this.setState({ isLoading: true }, () => { - const { defaultPage, createConfirmUser, linkData, hashSettings } = this.props; + const { + defaultPage, + createConfirmUser, + linkData, + hashSettings, + } = this.props; const isVisitor = parseInt(linkData.emplType) === 2; this.setState({ errorText: "" }); @@ -368,7 +373,7 @@ function mapStateToProps(state) { settings: state.auth.settings.passwordSettings, greetingTitle: state.auth.settings.greetingSettings, hashSettings: state.auth.settings.hashSettings, - defaultPage: state.auth.settings.defaultPage + defaultPage: state.auth.settings.defaultPage, }; } @@ -376,5 +381,5 @@ export default connect(mapStateToProps, { getConfirmationInfo, createConfirmUser, login, - logout + logout, })(withRouter(withTranslation()(CreateUserForm))); diff --git a/web/ASC.Web.Client/src/store/confirm/actions.js b/web/ASC.Web.Client/src/store/confirm/actions.js index 5b2854a146..2e17197866 100644 --- a/web/ASC.Web.Client/src/store/confirm/actions.js +++ b/web/ASC.Web.Client/src/store/confirm/actions.js @@ -41,7 +41,7 @@ export function createConfirmUser(registerData, loginData, key) { const promise = new Promise((resolve, reject) => { setTimeout(() => { login( - loginData.email, + loginData.userName, loginData.passwordHash )(dispatch) .then(() => { @@ -81,8 +81,8 @@ export function activateConfirmUser( const promise = new Promise((resolve, reject) => { setTimeout(() => { login( - data.userName, - data.passwordHash + loginData.userName, + loginData.passwordHash )(dispatch) .then(() => { resolve(loadInitInfo(dispatch));