I got bit by this at my current job.
I didn't remember telling them my salary at my previous company (usually I decline to answer), but my manager brought it up when I was trying to negotiate an extra 5k.
It's unfortunate that I must've told them my base salary when applying online and that I didn't do a proper negotiation afterwards. My new company doesn't give out stocks of any kind, so overall I'm making less.