The verse permitting temporary marriage was revealed in the Book of Allah, and we acted upon it with the Messenger of Allah ﷺ. No Quranic revelation came down forbidding it, nor did he prohibit it until he died. Then a man said whatever he wished according to his own opinion.
أنزلت آية المنعة في كتاب الله ففعلناها مع رسول الله ﷺ، ولم ينزل قرآن يحرمه ولم ينه عنها حتى مات قال رجل برأيه ما شاء.
Bukhari related it in the tafsir (4518), and Muslim in the Hajj (1226:172), both of them narrating from Imran Abu Bakr, who said, "Raja narrated to us, from Imran bin Husayn," and he mentioned it, and the wording given here is Bukhari's. In Muslim's wording, "Then no verse was revealed abrogating the verse concerning combining Hajj and Umrah."It is also found in the Sahihayn, Bukhari in the Hajj (1571) and Muslim (1226:17), by the route of Hammam, who said, "Qatada narrated to us, Mutarrif told me, from Imran bin Husayn," who said, "We combined Hajj and Umrah in the time of the Messenger of Allah ﷺ, and the Quran was revealed concerning it. Then a man spoke about it according to his own opinion, whatever he wished."His statement, "a man spoke about it according to his own opinion, whatever he wished," refers to Umar bin Khattab, for he used to forbid combining Hajj and Umrah, just as Uthman did.In Sahih Muslim (1226:168), Mutarrif said, Imran bin Husayn sent for me during the illness in which he died, and said, "I am going to tell you some hadiths that Allah may perhaps benefit you with after me. If I remain alive, keep this from me, but if I die, then narrate it if you wish, for he has greeted me with peace. Know that the Prophet of Allah ﷺ combined a Hajj and an Umrah, and afterward no revelation from Allah's Book came down concerning it, nor did the Prophet of Allah ﷺ forbid it. A man spoke about it according to his own opinion, whatever he wished."His statement, "he has greeted me with peace," means one of the angels. He said, "until I was cauterized, and it ceased, then I stopped the cauterization and it returned."Muhammad bin Sirin said, Imran bin Husayn arrived along with some companions of his who had combined Hajj and Umrah. It was said to Uthman bin Affan, "The son of Imran has arrived with companions of his, having combined Hajj and Umrah." So Uthman sent word to him, saying, "Choose one of the two." Imran said, "The Commander of the Faithful forbade us this, and now he gives us a choice, so I choose Hajj."Musaddad related it in his Musnad, from Abdul-Wahid bin Ziyad, who said, "Asim Ahwal narrated to us, from Muhammad bin Sirin," and he mentioned it. Matalib Aliyah (1174).There is disagreement about whether Muhammad bin Sirin heard directly from Imran bin Husayn. Imam Ahmad affirmed that he did, as his son Abdullah related from him, while Daraqutni denied it. Yet his narration from him is found in the Sahih, and Allah knows best.