حَدَّثَنَا أَحْمَدُ بْنُ عَبْدِ الْوَهَّابِ بْنِ نَجْدَةَ الْحَوْطِيُّ، ثنا يَحْيَى بْنُ صَالِحٍ الْوُحَاظِيُّ، ثنا عَلِيُّ بْنُ حَوْشَبٍ، عَنْ أَبِي قَبِيلٍ، عَنْ سَالِمٍ، عَنْ أَبِيهِ، قَالَ: قَالَ رَسُولُ اللهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ: «لَا تَتَّخِذُوا الْمَسَاجِدَ طُرُقًا إِلَّا لِذِكْرٍ أَوْ صَلَاةٍ»
Sayyiduna Ibn Umar (may Allah be pleased with them both) said that the Messenger of Allah (peace and blessings be upon him) said: "Do not make the mosques into passageways, except (for coming) for remembrance (of Allah) or prayer."