Maybe your friend wasnt “Temple Worthy” (no Temple recommend?) either didn’t tithe at the appropriate rate; didn’t attempt Ward services; was married himself to a nonMormon, etc) rather than the “known coffee drinker” as the reason. My husband’s family is LDS and I know the types of issues I Iisted have been discussed by those who aren’t able to attend Temple weddings (including the bride or grooms parents).
Not paying a (privately self-declared) 10% tithing, not regularly attending church meetings, not living the church's "Word of Wisdom" health code(i.e., by smoking tobacco, drinking alcohol and/or coffee, abusing drugs) - these will disqualify one from Temple attendance (not from regular church meeting attendance in Chapels, of course).
However, simplying marrying or being married to a person of another faith has no disqualifying effect on the person's being to attend Temples herself/himself.
And yes, it is correct that only those meeting the standards of Temple attendance are able to attend any Temple sessions. Temples are not regular houses for Sunday worship; in fact they are closed on Sundays which is when regular worship services are held in congregational chapels.