A man asked Abdullah bin Umar about temporary marriage, and he replied, "It is forbidden."The man said, "But so-and-so permits it."Abdullah bin Umar responded, "By Allah, he knows full well that the Messenger of Allah ﷺ forbade it on the day of Khaybar, and we were not fornicators."
أن رجلا سأل عبد الله بن عمر عن المتعة، فقال: حرام، قال: فإن فلانا يقول فيها. فقال: والله لقد علم أن رسول الله ﷺ حرمها يوم خيبر، وما كنا مسافحين.
No references are available.
Bayhaqi (7/202) narrated it through several routes from Abu Abbas Muhammad bin Yaqub, who reported that Muhammad bin Abdullah bin Abdul-Hakam informed him, who reported that Ibn Wahb informed him, who said, Umar bin Muhammad bin Zayd bin Abdullah bin Umar bin Khattab informed me, from Ibn Shihab, who said, Salim bin Abdullah informed me, and he related it. Its chain of transmission is sahih.As for his statement, "So-and-so says such-and-such about it," this refers to Ibn Abbas.