fix isemail available in dataTotable and reset password in createuserrightpanel

develop
Morisse 6 years ago
parent ae8083db97
commit 6d20f4733c
  1. 1
      src/CreateUserRightPanel.js
  2. 2
      src/DataToTable.js
  3. 2
      src/UserRightPanel.js

@ -55,6 +55,7 @@ export default class CreateUserRightPanel extends Component {
this.setState({
message: {type: 'success', title: 'User Created', body: this.state.userIdValue+' has been added to watcha'},
});
this.refresh();
this.displayInfoMessage();
} else {
this.setState({

@ -346,7 +346,7 @@ export default class DataToTable extends Component {
isEmailAvailable = (mail) => {
let emailAvailable = true;
for (const user in this.state.arrayOfdata) {
if (this.state.arrayOfdata[user]['Email'] === mail) {
if (this.state.arrayOfdata[user]['Email']['data'] === mail) {
emailAvailable = false;
}
}

@ -149,7 +149,7 @@ export default class UserRightPanel extends Component {
const homeServer = this.props.server;
const accessToken = this.props.token;
try {
const userRequest = await fetch(homeServer+
const userRequest = await fetch(homeServer+'_matrix/client/r0/watcha_reset_password'+
encodeURIComponent(this.props.data['User Id']['data']), {
method: 'POST',
headers: {

Loading…
Cancel
Save