/// <summary> /// Generate a password reset token and email the link to the user. /// </summary> /// <param name="user"></param> public void GenerateResetRequest(User user) { user.ResetPasswordToken = KeyGenerator.GetUniqueKey(ResetPasswordTokenLength); _userRepository.Save(user); _notificationService.Notify(user, new NotificationTemplate( _configService.AppSettings("NotificationTemplatePath"), "ForgotPassword"), new { ResetToken = user.ResetPasswordToken }); }