Poor little guy. Brandi does this when I'm in the shower at night. I close and lock the bedroom door when I take my showers (single gal living alone) and sometimes Brandi can't get to her potty pad because it's in another room. The only time when she comes in the bathroom when I'm taking a shower is to let me know she has to potty. So I have to get out of the nice hot shower to go let her out of my room.
I too learned that lesson

. When a girls gotta go, she's gotta go.