A phobia is a type of anxiety disorder, usually defined as a persistent fear of an object or situation in which the sufferer commits to great lengths in avoiding, typically disproportional to the actual danger posed, often being recognized as irrational...
in which the sufferer is unable to urinate
Urination, also known as micturition, voiding, peeing, weeing, pissing, and more rarely, emiction, is the ejection of urine from the urinary bladder through the urethra to the outside of the body. In healthy humans the process of urination is under voluntary control...
in the (real or imaginary) presence of others, such as in a public restroom. It most commonly affects males, though there are female sufferers too. The analogous condition that affects bowel movement is called parcopresis
Parcopresis is a psychological disorder, more accurately termed psychogenic fecal retention, whereby the sufferer is unable to defecate unless they have a certain level of privacy. The level of privacy involved varies from sufferer to sufferer...
Many people have brief, isolated episodes of urinary difficulty in situations where other people are in close proximity.