Fix login when showing an error (#329)

This commit is contained in:
enahum 2017-03-06 19:22:45 -03:00 committed by Harrison Healey
parent 8610f9f943
commit 6296f39673

View file

@ -173,16 +173,20 @@ class Login extends Component {
errorId === 'ent.ldap.do_login.user_not_registered.app_error'
) {
return {
id: 'login.userNotFound',
defaultMessage: "We couldn't find an account matching your login credentials."
intl: {
id: 'login.userNotFound',
defaultMessage: "We couldn't find an account matching your login credentials."
}
};
} else if (
errorId === 'api.user.check_user_password.invalid.app_error' ||
errorId === 'ent.ldap.do_login.invalid_password.app_error'
) {
return {
id: 'login.invalidPassword',
defaultMessage: 'Your password is incorrect.'
intl: {
id: 'login.invalidPassword',
defaultMessage: 'Your password is incorrect.'
}
};
}
return error.message;