The Catechism of the Catholic Church is clear about the following.
1415 Anyone who desires to receive Christ in Eucharistic communion must be in the state of grace. Anyone aware of having sinned mortally must not receive communion without having received absolution in the sacrament of penance.
To receive the Eucharist is a privilege not a right. It is a gift not a reward. It is a sign of love. To share in the Body and Blood of the Lord requires that we are in union with him. Paul made this clear in his instructions to the Corinthians. "Therefore whoever eats the bread or drinks the cup of the Lord unworthily will have to answer for the body and blood of the Lord. A person should examine himself, and so eat the bread and drink the cup. For anyone who eats and drinks without discerning the body, eats and drinks judgment on himself." (1 Cor 11:27-29)
How often have people received Communion in the state of serious sin! They do so sometimes because they have dulled their conscious to the reality of sin. They seek to justify themselves rather than be justified by the death and resurrection of Jesus. Sometimes they receive, because they do not want others to think they are in serious sin. Sometimes they do so out of habit rather than faith. They fail to recognize the sacredness of the mystery and the need to be in right relationship with God. We do not know the internal heart of the person, but their persistent, external actions are clear. We are all unworthy to receive the Body and Blood of Christ. This is based on our humanity, not our actions. When our actions make us unworthy, we need to seek the Sacrament f Reconciliation so that we may be one with God once more.