Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Dealing with email addresses. Consider this case:

You get two signups on a website. One is for me@example.com and the other is for Me@example.com. Is this one person or two separate people? And how do you store them in a database?

Some email systems will treat me and Me as two separate users, so if you change the case there is a chance the wrong person will get the email. So, the advice is that you should never change the case. But if you don't change the case should you treat them as separate users?



Yes you should treat them as separate users, because there is less chance of you doing something wrong.

What you need to consider at sign ups are more than just an email to distinguish.

Ex. if name, address and phone are the same, but the emails are different, chances are you have the same person and thus you can assume it is the same person.


I know all of this. The query was looking for everyday things that are more complicated than people expect.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: