Delete an account while it hasn't been activated within 24 h

A

Anonymous

Guest
Hi there!

I come a cross some sites that send the activation code to the email address. And let us activate the account through the link. Anyway it will be deleted if it is inactive within 24 hours. Now I want to do this same thing in my site. Could someone help explain the concept of doing it or give me any links of the tutorial?

Thanks, have a nice day.

Makara Kao
 
The activation code can be the user's id plus the activation code generation time (encrypted of course).
This way you can compare the time (when the user follows the link) and the user id, for validation.
There are a few ways to do that.
This information can also be stored somewhere. Every user should have a different validation code for security reasons.
 
Thank you, gesf, for your explanation.

One more thing. Are there any ways to auto-delete inactive users without (his/her confirmed link to our website and then verify his/her expired time). I sometimes want to auto-delete it, coz if the user doesn't follow the link forever, and another user needs a username which is the same as this inactive user. So what will happen?

Is it a good way if I check (means that I verify and delete the accounts which are inactive more than 24 hours) every time the visitors hit my website? Does doing this slow down my site? Or any suggestion?

Thanks in advance.

Makara Kao
 
Back
Top