With my mod you may choose what to do in single marriages, indipendently by gender and selectability of sim spouses. JMP did a mod which changes this fixed rule, so in opposite-gender marriages the female gets the male's last name, and in same-gender joined unions they retain their original last name instead. When two sims get married/joined, the 'marriagee' always get the same last name than the active sim (the 'marriager'), who did the proposition.
This is intended as a further developement of J.M.