Web: Client: confirm: added passwordHash to co createUser, activateUser
This commit is contained in:
parent
2547a70498
commit
e2f3daacec
@ -117,7 +117,7 @@ class Confirm extends React.PureComponent {
|
|||||||
|
|
||||||
const loginData = {
|
const loginData = {
|
||||||
userName: this.state.email,
|
userName: this.state.email,
|
||||||
password: hash,
|
passwordHash: hash,
|
||||||
};
|
};
|
||||||
|
|
||||||
const personalData = {
|
const personalData = {
|
||||||
|
@ -127,7 +127,7 @@ class Confirm extends React.PureComponent {
|
|||||||
|
|
||||||
const loginData = {
|
const loginData = {
|
||||||
userName: this.state.email,
|
userName: this.state.email,
|
||||||
password: hash,
|
passwordHash: hash,
|
||||||
};
|
};
|
||||||
|
|
||||||
const personalData = {
|
const personalData = {
|
||||||
|
@ -31,7 +31,7 @@ export function createConfirmUser(registerData, loginData, key) {
|
|||||||
return api.people
|
return api.people
|
||||||
.createUser(data, key)
|
.createUser(data, key)
|
||||||
.then((user) => dispatch(setCurrentUser(user)))
|
.then((user) => dispatch(setCurrentUser(user)))
|
||||||
.then(() => api.user.login(loginData.userName, loginData.password))
|
.then(() => api.user.login(loginData.userName, loginData.passwordHash))
|
||||||
.then(() => loadInitInfo(dispatch));
|
.then(() => loadInitInfo(dispatch));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -51,12 +51,12 @@ export function activateConfirmUser(
|
|||||||
|
|
||||||
return (dispatch) => {
|
return (dispatch) => {
|
||||||
return api.people
|
return api.people
|
||||||
.changePassword(userId, loginData.password, key)
|
.changePassword(userId, loginData.passwordHash, key)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
return api.people.updateActivationStatus(activationStatus, userId, key);
|
return api.people.updateActivationStatus(activationStatus, userId, key);
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
return dispatch(login(loginData.userName, loginData.password));
|
return dispatch(login(loginData.userName, loginData.passwordHash));
|
||||||
})
|
})
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
return api.people.updateUser(changedData);
|
return api.people.updateUser(changedData);
|
||||||
|
Loading…
Reference in New Issue
Block a user