Avoid multiple accounts with same email
I'm working on a website where users receive prizes based on the number of users who sign up with their invitation link (referrals).
Gmail allows their users to use multiple variations of one email. There are three main methods for expanding the number of usable Google email addresses that you can have from a single Gmail account:
So:
are all the same.
I don't want the user to create multiple account with one email to get the prizes. How can I avoid this?
Thanks.
My approach would be - store in a database table the emails that have already signed up. Have a validation step during sign up that checks that table for existing email addresses. If the user-submitted email exists in the table, fail validation and display a message to the user that they've already signed up.
And to avoid people gaming the system, use regex to strip out the extraneous characters before storing it in your database table.
A naive regex implementation might look like (.|+[A-z0-9_-]+|oogle)
(for .NET). That removes all periods, characters after plus signs, and fixes the gmail / googlemail problem.
It's not perfect, though (it would muck up boogle@gmail.com
, for instance), but you can tweak it to your needs and to your actual back end language.
上一篇: 为什么这个电子邮件正则表达式不起作用
下一篇: 避免使用同一电子邮件的多个帐户