The man was caught after a swimmer spotted a phone being slipped under his shower cubicle and alerted a lifeguard.