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:

  • Using the @googlemail.com domain.
  • Using the "dot" or period in your email name.
  • Using the plus sign "+" at the end of your name and adding extra characters.
  • So:

  • myname@gmail.com
  • myname@googlemail.com
  • my.name@gmail.com
  • my.name@googlemail.com
  • my.na.me@gmail.com
  • my.na.me@googlemail.com
  • myname+abcde@gmail.com
  • myname+123abc@gmail.com
  • my.name+abcdefg78@gmail.com
  • my.name+abcdefg78@googlemail.com
  • 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.

    链接地址: http://www.djcxy.com/p/92778.html

    上一篇: 为什么这个电子邮件正则表达式不起作用

    下一篇: 避免使用同一电子邮件的多个帐户