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)."
English reference: Vol. 1, Book 1, Hadith 325
Arabic reference: Book 1, Hadith 348
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.