In order to receive the Holy Eucharist, a communicant must among other things be in the state of grace. This basically means that the communicant must not have committed a mortal sin, a grave matter, since his last confession. Grave matters include murder and sexual acts outside of marriage, including homosexual acts, and other transgressions.

Catholics believe that at Communion they are receiving the actual body of Christ. It is the most sacred, important and intimite of the Seven Sacraments.

Of course, people, who are not in the state of grace, receive the sacrament every day. But when the Eucharistic Minister knows that one does not fall under the state of grace, he or she has a duty not to administer the sacrament.

I only know of one instance where communion was denied for this reason. A local doctor worked in a clinic where he performed abortions actually thought he could receive communion in the Church.

It sounds harsh that this happened at her mother's funeral, and I'm not sure if the woman was a practicing Catholic, who had been receiving communion elsewhere. But if she hadn't been a practicing catholic and was present only because it was her mother's funeral, she should have just remained seated during communion. And the same holds true for the man or woman, who is having an extramarital affair.