Prostitution was legal throughout the Roman Empire in all periods. Most prostitutes were slaves or freedwomen. Prostitutes in Rome had to register with the aediles. Despite what might seem to be a clear distinction as a matter of law, the jurist Ulpian opined that an openly promiscuous woman brought the status of prostitute upon herself, even if she accepted no money. The Augustan moral legislation that criminalized adultery exempted prostitutes, who could legally have sex with a married man. Encouraged to think of adultery as a matter of law rather than morality, a few socially prominent women even chose to avoid prosecution for adultery by registering themselves as prostitutes.