コード例 #1
0
        public IActionResult ForgotPassword(string emailAddress)
        {
            User user = this.userReadService.GetUserByEmail <User>(emailAddress);

            if (user is null)
            {
                return(BadRequest("User with given email does not exist!"));
            }

            else
            {
                userCommandService.ResetPassword(emailAddress, user.Id);
                return(Ok("Reset email has been sent to the email!"));
            }
        }