Rafi' bin Ishaq (may Allah have mercy on him) said: I heard Abu Ayyub (may Allah be pleased with him) say in Egypt: By Allah! I do not know what to do with these toilets (which have been built facing the qiblah), when the Messenger of Allah (peace and blessings be upon him) said: "When one of you goes to relieve himself or to urinate, let him not face the qiblah with his private part."
Hadith Referenceالمعجم الكبير للطبراني / باب الخاء / 3916