0

Example I have webform at http://www.example.com/webform. Once I submit the form it will redirect to confirmation page which is http://www.example.com/node/8/done?sid=18&token=ggffdgdf7g8df7g89d7fg98df77

May I how to get this token value from database? I had tried md5() for submitted time, but the value is not the same.

1 Answer 1

0

I found the answer in the webform.module file:

/**
 * Return the access token for a submission.
 *
 * @param object $submission
 *   The submission object.
 *
 * @return string
 *   The access token for the submission.
 */
function webform_get_submission_access_token($submission) {
  return md5($submission->submitted . $submission->sid . drupal_get_private_key());
}

So it's an MD5 hash of a concatenation of the submission date, submission ID and a random private key, set by the webform module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.