Question

For our website, we set up the account activation email with the following tutorial (in cakephp):

http://www.jonnyreeves.co.uk/2008/06/cakephp-activating-user-account-via-email/

On our live site, it seems that the activation works for the most part, however some people are receiving the following error when clicking on the activation email link to activate their account:

Error: The requested address '/users/activate/36/10a1a794' was not found on this server.

This is odd to me because the link looks fine: "users" controller, "activate" action, user_id = 36, and hash code = 0a1a794. Not sure why this error is happening. One thing I read is to clear the files in the cache folder and that didn't seem to change anything. Please help thanks!

Was it helpful?

Solution

The activation hash has limited validity(same day).

So if send the activation email on 1st of any month, it will be valid till 11:59pm of 1st. The link wont work after 12:00am(technically 2nd of the month).

Hope that helps.

OTHER TIPS

Yes, that's what Josh R said, the hash is computed for the same day and this is a VERY bad idea.

You should either stop hashing the date or validate against two values: one for today's date, one for yesterday's date.

Also, a recommendation: don't just go there and copy the files, try to learn something from it and please, do it your way. You'll learn a lot more.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top