Registering a new user not working as a UNIQUE constraint failed on user.email.
When registering a new user empty string ('') is taken as input in the user.email and registration is successful for the first user in the database. When a second user registers in the database the email unique constraint failed and the user is not created.
When the first user is created in email textbox I wrote testing@gmail.com but in database it was not taken from the textbox.
?[35m(C:/Users/hamza/go/src/github.com/NyaaPantsu/nyaa/models/users/create.go:44)?[0m
?[33m[2018-05-18 22:26:11]?[0m ?[36;1m[2.99ms]?[0m INSERT INTO "users" ("username","password","email","status","created_at","updated_at","api_token","api_token_expiry","language","theme","alt_colors","old_nav","mascot","mascot_url","anidex_api_token","nyaasi_api_token","tokyotosho_api_token","settings","pantsu","md5") VALUES ('testing','$2a$10$YCY.3mOIJ6VOKkLqEL04SuAlUOv24uIUHgdntUjvwuUqOdzkJzn1.','','0','2018-05-18 22:26:11','2018-05-18 22:26:11','192896a7952e99b37d6947b94bab7a0184254669d58a9947f0354bfcea0bd110','1970-01-01 05:00:00','','','','','','','','','','{"settings":{"followed":false,"followed_email":false,"new_comment":true,"new_comment_email":false,"new_follower":false,"new_follower_email":false,"new_responses":false,"new_responses_email":false,"new_torrent":true,"new_torrent_email":false}}','1','9ad574806427070b94735f216e9abdc1')
?[36;31m[1 rows affected or returned ]?[0m
For the second user the email was testing2@gmail.com but it is not passed to the database and UNIQUE constraint fails for email.
Registering a new user not working as a UNIQUE constraint failed on user.email. When registering a new user empty string ('') is taken as input in the user.email and registration is successful for the first user in the database. When a second user registers in the database the email unique constraint failed and the user is not created.
When the first user is created in email textbox I wrote testing@gmail.com but in database it was not taken from the textbox.
For the second user the email was testing2@gmail.com but it is not passed to the database and UNIQUE constraint fails for email.
Only one user can be inserted and for all the other users it can not be created.
If someone is maintaining this then can you fix this issue in the next commit. Otherwise I'll take a look and try to fix it.