Nafi' narrates: Abdullah bin Amr al-Ajlani narrated to Sayyiduna Abdullah bin Umar (may Allah be pleased with them both), from his own (or perhaps his) father: The Prophet (peace and blessings be upon him) forbade that either of the two qiblahs should be faced while urinating or defecating.
Al-Tabarani recorded it in al-Mu'jam al-Kabir; its chain contains a narrator, Abdullah bin Nafi', who is da'if (weak).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الطهارة / 1010