Thanks for your question and concern. Urethra is compromised with infection when one has urinary tract infection. Having sex with UTI can worsen the situation and increase the severity of infection. So, it is always recommended not to have sex at this time. You can enjoy safer and comfortable sex once you have cleared off the infection. So, my advice is to consult a doctor and take medication for getting cured. If you are having sex with a urinary tract infection, my advice is to drink plenty of water. After having intercourse, wipe from the front to back so that chances of recurrence of infection will be minimal. Wish you good luck.