According to Islam, fulfilling one’s sexual desires can only be done with the observation of Islamic law. Most of the marja’s today believe that performing the mutah or temporary marriage with a virgin girl can only be contracted with the permission of her father, or her grandfather from the father’s side [when the father isn't alive][1].[2]
So if a girl comes of age, reaching the age of bulugh and obligation, and is rashidah (meaning that she can tell what is to her benefit and what isn't), she needs to get her father or grandfather’s (in the case of not having a father) permission if she is a virgin. But if she isn't a virgin as a result of legitimate intercourse [with a permanent or temporary husband], there is no longer any need for her father or grandfather’s permission.[3]
Conclusion:
According to most marja’s, any type of marriage must be with the permission of the father or grandfather[4] of the girl and illegitimately losing virginity doesn’t change this ruling whatsoever and their permission remains as one of the conditions of the marriage.
Of course, one more thing remains and that is the rulings that were mentioned above were all for Shia men and women, now if the man is to be Sunni, other criteria also factors into the rulings that you can learn about by referring to the following question of this website:
Index: The marriage of a Shia female with a Sunni male, Question 1772 (website: 1757).
[1] What these phrases are apparently saying is that getting permission is both a wadh’i and taklifi condition, meaning that getting married with a virgin is both haram (they have a committed a haram act) and void (they haven’t become husband and wife).
[2] With help from: Index: Relationship with a non-mahram before getting married, Question 1407 (website: 1427).
[3] With help from: Index: Temporary marriage (mutah) and its conditions, Question 475 (website: 516).
[4] Tawdhihul-Masa’ele Maraje’, vol.2, pg.387, issue 2376.