0

I am trying to send an activation link to given mail, if user clicks that activation link in his mail then his account is activated , this much I have done successfully.. I am doing this thing by setting a flag initially in the database to 0 if the activation link is clicked it is updated to 1. but I want to include one more thing that if user doesn't click activation link from his mail within an hour, that link will be expired that is my 'flag' in the database will automatically updated to 1 after an hour. How can I do this thing in codeigniter.?? If possible can you please provide me some link or tutorial for this..?

avinashse
  • 1,440
  • 4
  • 30
  • 55

1 Answers1

0

you can store an additional Timestamp/DateTime column on when the account was created, use that for comparing against a that value+1 hour. or use another table that would be used only for users that activated is false(zero) where you can keep track of activation process. some table columns

id[int]|userid[int]|last_email_used[Varchar 255]|sended_on[Datetime]

hope it helped

Gntem
  • 6,949
  • 2
  • 35
  • 48