Click here to Skip to main content
15,884,739 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This time i need some suggestion. In my project i am having a registration form with fields(first name, last name, email, mobile and password). when user register, a activation mail is goes to the email address he is registering with and in database table the column is(fname, lname, email, email, mobile, password, activation code). Email is having primary key. When user register mail goes and table filled with activation code, If activation code is present in table column then user not able to login. The email has a link, when user click on link it simply delete the activation code from the table. So that user able to login.

My problem is suppose if the email is deleted by mistake from user inbox then he is not able to login because activation code is still present in DB column and when he is try to register again with same email ID then due to primary key error comes.

Give me suggestion what can i do to register again with same email if the activation email got deleted but i want primary key in email column.
Posted
Comments
[no name] 20-Jul-14 17:08pm    
Not seeing what the problem is. If the email already exists, then generate a new activation code, delete the old one and resend the email.

1 solution

When a user logs in, if activation code field is filled, give the user 2 options to choose:
1. Go to his email to activate the account; or
2. Re-send a new activation code
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900