Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 26-Dec-12 19:46pm
Comments
Sergey Alexandrovich Kryukov at 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 at 27-Dec-12 4:41am
   
True! ::thumbsup::
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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.
 

Thanks
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 383
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 171
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,252
1 OriginalGriff 5,498
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web03 | 2.8.140814.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2014
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