Php reset password process, not sure how to retrive from token -
Php reset password process, not sure how to retrive from token -
i had been reading through many pages resetting password token.
i understand point of getting token link, $_get['token'];
but not next after that, do token? check if exist in database? because read on link cross referencing in reset_password table, dont understand means. looking options send users reset password emails
do check if token exist , pick email on same row? allow user reset password using email?
the thought behind using token security reason.
you create own token using info only visible you.
consider scenario understand reset one's password has specific link , add together email &email={user_email}
that create extremely unsafe.
but if hash token info know of, can like:
&email={user_email}&token={token} and retrieve token in code, check if fits specific rules or not, , reset email password.
let me give illustration of how hash in way visible , enjoy benefits of safe features.
lets hash using email + today's date:
$token = md5($email+date('y-m-d',time())) this create token valid today.
php token
Comments
Post a Comment