.subscribe(
() => this.redirectService.redirectToHomepage(),
- err => this.error = err.message
+ err => {
+ if (err.message.indexOf('credentials are invalid') !== -1) this.error = this.i18n('Incorrect username or password.')
+ else if (err.message.indexOf('blocked') !== -1) this.error = this.i18n('You account is blocked.')
+ else this.error = err.message
+ }
)
}
.subscribe(
res => {
const message = this.i18n(
- 'An email with the reset password instructions will be sent to {{ email }}.',
+ 'An email with the reset password instructions will be sent to {{email}}.',
{ email: this.forgotPasswordEmail }
)
this.notificationsService.success(this.i18n('Success'), message)