Muhammad allowed his companions to practice Mutah. This is recorded in the hadiths..
Sahih Muslim Book 008, Number 3252:
Sabra Juhanni reported: Allah's Messenger pbuh permitted temporary marriage for us. So I and another person went out and saw a woman of Bana 'Amir, who was like a young long-necked she-camel. We presented ourselves to her (for contracting temporary marriage), whereupon she said: What dower would you give me? I said: My cloak. And my companion also said: My cloak. And the cloak of-my companion was superior to my cloak, but I was younger than he. So when she looked at the cloak of my companion she liked it, and when she cast a glance at me I looked more attractive to her. She then said: Well, you and your cloak are sufficient for me. I remained with her for three nights, and then Allah's Messenger pbuh said: He who has any such woman with whom he had contracted temporary marriage, he should let her off.
Sahih Bukhari Volume 6, Book 60, Number 139:
Narrated Abdullah: We used to participate in the holy wars carried on by the Prophet and we had no women (wives) with us. So we said (to the Prophet). "Shall we castrate ourselves?" But the Prophet forbade us to do that and thenceforth he allowed us to marry a woman (temporarily) by giving her even a garment, and then he recited: "O you who believe! Do not make unlawful the good things which Allah has made lawful for you."
Caliph Umar banned Mutah practise among the Muslims, not Quran or Muhammad..
Sahih Bukhari Volume 6, Book 60, Number 43:
Narrated 'Imran bin Husain: The Verse of muta was revealed in Allah's Book, so we performed it with Allah's Apostle, and nothing was revealed in Qur'an to make it illegal, nor did the Prophet prohibit it till he died. But the man (omar) just expressed what his own mind suggested.