- private onUserFetched (userJson: User) {
- this.userId = userJson.id
- this.username = userJson.username
+ resetPassword () {
+ this.userService.askResetPassword(this.user.email).subscribe(
+ () => {
+ this.notifier.success(
+ this.i18n('An email asking for password reset has been sent to {{username}}.', { username: this.user.username })
+ )
+ },
+
+ err => this.error = err.message
+ )
+ }
+
+ private onUserFetched (userJson: UserType) {
+ this.user = new User(userJson)