开发者

Cakephp Account Activation Email - Address Not Found On Server

开发者 https://www.devze.com 2023-01-29 16:02 出处:网络
For our website, we set up the account activation email with the following tutorial (in cakephp): http://www.jonn开发者_C百科yreeves.co.uk/2008/06/cakephp-activating-user-account-via-email/

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

http://www.jonn开发者_C百科yreeves.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!


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消