public static UserPasswordResetRequest UserPasswordResetRequestAdd(string email) { var userPasswordResetRequest = UserPasswordResetRequestRepository.UserPasswordResetRequestFetch(email); userPasswordResetRequest.Token = Guid.NewGuid().ToString().ToUpper().Replace("-", string.Empty); userPasswordResetRequest.TokenExpirationDate = DateTime.Now.AddHours(Settings.TokenExpirationNumberOfHours); userPasswordResetRequest = UserPasswordResetRequestRepository.UserPasswordResetRequestSave(userPasswordResetRequest); return(userPasswordResetRequest); }
private static UserPasswordResetRequest UserPasswordResetRequestSave(UserPasswordResetRequest userPasswordResetRequest) { if (!userPasswordResetRequest.IsValid) { return(userPasswordResetRequest); } UserPasswordResetRequest result; result = UserPasswordResetRequestRepository.UserPasswordResetRequestUpdate(userPasswordResetRequest); return(result); }