A man who had a drink with a bride and groom at a wedding before leaving has been banned from driving for a year.