Click here to Skip to main content
13,048,584 members (90,957 online)
Rate this:
Please Sign up or sign in to vote.
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

Posted 26-Dec-12 19:46pm
Why doing this dangerous and complicating thing with 6 days? A user should get access only after confirmation...
Vani Kulkarni 27-Dec-12 4:41am
True! ::thumbsup::
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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.


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100