예제 #1
0
        public async Task <IActionResult> ForgotPassword(string email)
        {
            if (string.IsNullOrEmpty(email))
            {
                return(OtherResult(HttpStatusCode.BadRequest, "Email is required."));
            }

            var result = await _aApplicationUserRepository.ForgotPasswordAsync(email);

            if (result)
            {
                return(OKResult(1, "Email sent for resetting password."));
            }

            return(OKResult(0, "User not found for provided email."));
        }