Commit 84766175 authored by Mat's avatar Mat

le token encodé contient plutôt la référence de l'offre plutôt que de la lettre

parent d5c16d59
......@@ -57,10 +57,9 @@ class LettreToken
if ($user !== null) {
// TODO ici une recette secrète, hors dépôt GIT !!!
$token = $user->getId()
.'_'. $user->getTokenKey()
.'_'. $lettre->getId()
.'_'. $lettre->getReference();
$token = $user->getTokenKey()
.'_'. $lettre->getOffre()->getId()
.'_'. $lettre->getOffre()->getReference();
return base64_encode($token);
......@@ -81,10 +80,9 @@ class LettreToken
$data = explode('_', base64_decode($token));
return array(
'user_id' => $data[0],
'token_key' => $data[1],
'lettre_id' => $data[2],
'lettre_ref' => $data[3],
'token_key' => $data[0],
'offre_id' => $data[1],
'offre_ref' => $data[2],
);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment