There is a well-known Halachah codified in the Shulchan Aruch that a congregation should not call a father and son for successive Aliyot to the Torah. Several different reasons have been suggested for this Halachah. The Maharam of Rotenberg (a”h) explained that calling a father and a son for Aliyot one right after the other may cause an Ayin Ha’ra and therefore congregations who wish to give Aliyot to a father and son should separate the Aliyot.
A different reason is offered by the Orchot Chaim (a”h), who notes that the Torah is sometimes referred to as “testimony”. Reading the Torah is therefore likened to submitting testimony, and just as a father and son may not testify together, similarly, they should not read the Torah one after the other.
There are many questions that could be asked regarding the Orchot Chaim’s explanation. The Vilna Gaon (a”h), for example, noted that theoretically, halachah allows calling children and women for Aliyot to the Torah (though practically speaking, this is not allowed for technical reasons), despite the fact that they are clearly disqualified from rendering formal testimony. Clearly, then, suitability for an Aliya does not depend upon suitability for formal testimony.
Be that as it may, the Orchot Chaim’s theory forms the basis of a ruling of the Peri Megadim (a”h), that a congregation should not call intentional Torah violators for an Aliya. Since willful Torah violators are disqualified as witnesses, they also should not be called to read from the Torah. The Peri Megadim cites this halachah from the Sefer “Besamim Rosh”. This is also the position taken in the work “Megaleh Amukot”, who states that a person who shaves with a razor – which is a grave Torah violation – should not be called for an Aliya to the Torah.
The Ben Ish Chai (a”h), however, disagrees. He states that if we would begin making inquiries into a person’s spiritual standing before agreeing to call him for an Aliya, this would create destructive strife and discord in shul. This is especially true, he adds, in the case of respected, upstanding members of the community who would be refused Aliyot because of various allegations. We certainly do not want to create such tension and friction in shul and therefore we should not “investigate” congregants before calling them for an Aliya.
Ha’Rav Ovadiyah Yosef shlit”a, in his Sefer Yabia Omer, follows the ruling of the Ben Ish Chai, and writes that congregations should call people for Aliyot without inquiring into their spiritual standing. He adds, however, that if a person publicly desecrates Shabbat, he should not be given one of the seven principal Aliyot on Shabbat. If a congregation wishes to give him an Aliya, they should add an extra Aliya and call him for that Aliya. Generally speaking, however, a person may be called for an Aliya even if he is not fully observant. It might even be advisable to specifically invite violators for an Aliya for the section of the Torah that discusses the Mitzvah they ignore.
For example, if a person shaves with a razor, it might be a good idea to call him for the Aliya in Sefer Vayikra which mentions this prohibition. And if someone commits sins of Arayot, he should specifically be shown the section in the Torah outlining the prohibitions of Arayot, and so on, as this may inspire him to perform Teshuvah.