´'Abdullah bin 'Umar said:` "People say: 'When you sit to relieve yourself, do not face the Qiblah.' But one day I climbed up onto the roof of our house, and I saw the Messenger of Allah sitting on two bricks (to relieve himself), facing the direction of Baitul-Maqdis (Jerusalem)." This is a Hadith narrated by Yazid bin Harun.
Hadith Referenceسنن ابن ماجه / كتاب الطهارة وسننها / 322
Hadith Gradingالألبانی:صحيح | زبیر علی زئی:صحيح بخاري
´It was narrated that Ibn 'Umar said:` "I saw the Messenger of Allah in his (constructed) toilet, facing towards the Qiblah." (Da'if) (One of the narrators) 'Eisa said: "I told that to Sha'bi, and he said: 'Ibn 'Umar spoke the truth. As for the words of Abu Hurairah, he said: "In the desert do not face the Qiblah nor turn one's back towards it." As for the words of Ibn 'Umar, he said: "In the (constructed) toilet there is no Qiblah so turn in whatever direction you want." Another chain with similar wording.
´It was narrated that 'Aishah said:` "Mention was made in the presence of the Messenger of Allah of some people who did not like to face towards the Qiblah with their private parts. He said: 'I think that they do that. Turn my seat (in the toilet) to face the Qiblah.'" (Da'if) Another chain with similar wording.
With this chain also, it is narrated from Khalid bin Abi As-Salt in a similar manner.
Hadith Referenceسنن ابن ماجه / كتاب الطهارة وسننها / 324
Hadith Gradingالألبانی:ضعيف | زبیر علی زئی:ضعيف, إسناده ضعيف, خالد بن أبي الصلت: مقبول (تقريب: 1643) أي مجهول الحال،وثقه ابن حبان وحده, انوار الصحيفه، صفحه نمبر 388
Hadith Takhrij«تفرد بہ ابن ماجہ ، ( تحفة الأشراف : 16331 ، ومصباح الزجاجة : 132 ) ، وقد أخرجہ : مسند احمد ( 6/ 127 ، 137 ، 183 ، 219 ، 227 ، 239 ) ( ضعیف ) » ( سند میں خالد بن ابوصلت مجہول ہیں ، نیز عراک بن مالک کے بارے میں کہا گیا ہے کہ ام المومنین عائشہ رضی اللہ عنہا سے ان کا سماع نہیں ہے )
´It was narrated that Jabir said:` "The Messenger of Allah forbade facing the Qiblah when urinating. But I saw him, one year before he died, facing the Qiblah (while urinating)."
Hadith Referenceسنن ابن ماجه / كتاب الطهارة وسننها / 325