I'm working on an email system, and I'm onto the unsubscribing stage. Since most of my users would not know their user ID, I'm asking them to put their email into a text box (definitely preferred, since this IS an email system). In order to change their user meta (their subscribed status), I need to know the users ID. I mean I suppose I could pass it into an email and put it in the unsubscribe link, but I'm planning on sending out emails to people who don't have wordpress accounts.
So my main question is this:
What logic or functions should I use to determine a users ID from an inputted email address, and if none are found, store them in the wordpress database?
Thanks, I appreciate every answer!!