Click here to Skip to main content
15,882,209 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all

i am developing social media website when user registration is completed the user get to his mail confirmationcode
for his mail confirmation. if user didn't confirm his mail confirmation he can login with his crendential(emailid, password)
upto 6 days.. But after 6 days if user can login with his crendentials , we restrict the user he can't login the website, we
we want to display the message like "first u conifrm your email".
How we will do this functionality using web.config file or cs file. Please tell me any one

Thanks
Posted
Comments
Sergey Alexandrovich Kryukov 27-Dec-12 2:05am    
Why doing this dangerous and complicating thing with 6 days? A user should get access only after confirmation...
—SA
Vani Kulkarni 27-Dec-12 4:41am    
True! ::thumbsup::

As Sergey Alexandrovich Kryukov said its dangerous.

If you have to implement that then My advice will be to store first log in date in Log in table or some other table and each time check whether the user put his confirmation code or not if not then check date diff between first log in date and current date if > 6 then put your message.

Once user put his confirmation code set first log in date to null, and if first log in date is null then allow user with out any checking.
 
Share this answer
 
As I understand, After registering to your website,a user must have to confirm his email id with in 6 days and after 6 days (even user is confirming his email id), user will not be able to login.

If I am correct than what you have to do is, you have to check 6 days with the registeration date and maintain a flag like (isVerified) in your database table to which you will update the same when user confirmed his email id.


Thanks
 
Share this answer
 

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