1

I want to pass a token into my custom module via the URL, like so:

http://example.com/myurl?token=ffjei4T93F/ggF0PImZxlDWSR8JYHaPmkkjLSUVSKkr

Drupal has issues with passing tokens using clean URLs:

https://www.drupal.org/node/118072

...and because my token has a '/' forward slash in it it breaks if I use arg(1) to get the token.

What to do?

1 Answer 1

2

For Drupal 7, use drupal_get_query_parameters().

https://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_get_query_parameters/7.x

1
  • Thanks, I've been trying that for hours & just after you posted your reply I figured out it wasn't even calling the function I'd put my code in ;) Commented Jul 9, 2016 at 12:57

Your Answer

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

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