Open
Description
As we have more spam bots, they register the same e-mail twice and we send them e-mails for nothing. Example:
mysql> select count(email) from users_activation;
+--------------+
| count(email) |
+--------------+
| 20 |
+--------------+
1 row in set (0.01 sec)
mysql> select count(distinct email) from users_activation;
+-----------------------+
| count(distinct email) |
+-----------------------+
| 10 |
+-----------------------+
1 row in set (0.00 sec)
mysql> select substring(email,1,10),created_at from users_activation order by created_at;
+-----------------------+---------------------+
| substring(email,1,10) | created_at |
+-----------------------+---------------------+
| shiraidnor | 2020-01-16 05:55:54 |
| shiraidnor | 2020-01-16 05:55:55 |
| mckenzieri | 2020-01-16 12:58:35 |
| mckenzieri | 2020-01-16 12:58:36 |
| larryshryo | 2020-01-16 18:07:22 |
| larryshryo | 2020-01-16 18:07:23 |
| elwinmacdo | 2020-01-17 10:31:50 |
| elwinmacdo | 2020-01-17 10:31:51 |
| gpcrafty@s | 2020-01-17 16:29:37 |
| gpcrafty@s | 2020-01-17 16:29:39 |
| dtaylor268 | 2020-01-17 21:53:03 |
| dtaylor268 | 2020-01-17 21:53:05 |
| robertcsch | 2020-01-17 22:38:56 |
| robertcsch | 2020-01-17 22:38:58 |
| loansvc@be | 2020-01-17 23:30:20 |
| loansvc@be | 2020-01-17 23:30:21 |
| patrickpot | 2020-01-17 23:49:17 |
| patrickpot | 2020-01-17 23:49:18 |
| skp041856@ | 2020-01-18 02:10:50 |
| skp041856@ | 2020-01-18 02:10:52 |
+-----------------------+---------------------+
20 rows in set (0.00 sec)
In order to not create difficulties to real users, we can check whether e-mail already exist and it was created less than N seconds/minutes.