Abu Marzuq al-Tujibi said: A man came to Sayyiduna Uthman bin Affan (may Allah be pleased with him) during his caliphate while he was mounted, and said: O Commander of the Believers, I have a need with you. He said: I am in a hurry; if you ride behind me, I will fulfil your need. The man rode behind him and said: My neighbour divorced his wife in his anger and now he is in distress. I intended to devote myself and my wealth seeking reward: to marry her, consummate the marriage with her, then divorce her, so that she returns to her first husband. Sayyiduna Uthman bin Affan (may Allah be pleased with him) said: Marry only out of genuine desire; otherwise it is not valid.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 14192