Merge branch 'gdpr-username' of github.com:coralproject/talk into gdpr-email

* 'gdpr-username' of github.com:coralproject/talk:
  ChangeUsername instead of setUsername
This commit is contained in:
okbel
2018-04-30 22:04:18 -03:00
2 changed files with 7 additions and 3 deletions
@@ -35,6 +35,10 @@ class ConfirmChangesDialog extends React.Component {
};
render() {
const totalSteps = React.Children.count(this.props.children);
if (!totalSteps) return null;
return (
<Dialog
open={this.props.showDialog}
@@ -121,10 +121,10 @@ class Profile extends React.Component {
saveUsername = async () => {
const { newUsername } = this.state.formData;
const { setUsername } = this.props;
const { changeUsername } = this.props;
try {
await setUsername(newUsername);
await changeUsername(newUsername);
this.props.notify(
'success',
t('talk-plugin-auth.change_username.changed_username_success_msg')
@@ -266,7 +266,7 @@ Profile.propTypes = {
updateEmailAddress: PropTypes.func.isRequired,
changeUsername: PropTypes.func.isRequired,
root: PropTypes.object.isRequired,
setUsername: PropTypes.func.isRequired,
changeUsername: PropTypes.func.isRequired,
notify: PropTypes.func.isRequired,
username: PropTypes.string,
emailAddress: PropTypes.string,