It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that "the Messenger of Allah (peace and blessings be upon him) prayed inside the Ka'bah, and soon someone will come to you who will forbid you from that, so do not obey him" (he meant Sayyiduna Ibn Abbas, may Allah be pleased with them both). In another narration Sayyiduna Ibn Abbas (may Allah be pleased with them both) says: "Do not leave any part of the House behind you (during the prayer); rather, keep the whole House in front of you (that is, pray standing facing it)," while Simak says: I heard Sayyiduna Ibn Umar (may Allah be pleased with them both) say: "The Messenger of Allah (peace and blessings be upon him) prayed inside the House of Allah." Simak al-Hanafi says: I asked Sayyiduna Ibn Umar (may Allah be pleased with them both) about praying inside the House of Allah, and he said: "Pray inside it, for the Messenger of Allah (peace and blessings be upon him) prayed in it; and soon another person will come who will stop you from it, so do not obey him." Then I came to Sayyiduna Ibn Abbas (may Allah be pleased with them both) and asked him about the matter, and he said: "Keep the whole of it (the Ka'bah) in front of you (in the prayer), and do not keep any part of it behind you." This hadith is hasan (good).
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب القبلة وفيه ستر العورة وما يصلى فيه / 1113