Shaykh Abdul-Ghani Al-Umaree was asked:
Here majority of the Masjids give Iftaar to those fasting in the Masjid and giving them meals after Maghrib every day. These Masjids, some oppositions occur in it whereas they take advantage of this opportunity to bring the people together at the time of Iftar to beg and get donations. Some of the brothers go there to have Iftar with them and it becomes easy upon them to attend Maghrib and Isha in congregation. If some of them were to break their fast in the house, perhaps it would become hard upon them to go to Maghrib and return for Isha. Some of the brothers mentioned that it’s not befitting for the Salafi that he eats with them especially since he is not poor due to the begging which is present there. What is your opinion Oh Shaykh??
Who ever goes there then for congregational prayer.
If a Masjid and Imam are found upon the right path and up righteousness then it’s good, and they should pray behind him.
If it’s not found then, they should pray with them, and them breaking their fast from that which is placed in the Masjid from food then there is no problem with it.
Who ever is able to bring food for himself and for other then him to attain his reward then this is greater in reward.
It being that the Masjid has in it sins doesn’t prevent from the congregational prayer in it, with the non existence of other then it.
Also Ash Shaykh Abdul Hameed was asked a similar question and he replied:
“It’s not permissible to ask, eat in your homes or with them and there is no problem”