I have the following snippet where I am constructing a string to send out to the user as an email confirmation code:
$confirmation_code = $user_id . time() . date('d-m-Y',time());
$confirmation_code = sha1($confirmation_code);
Is there any chance of $confirmation_code
being duplicated at any step?
NOTE: Please remember that $user_id
is unique for each user