New Podcast

Posted Friday, August 27 at 12:18 pm

Listen in as Ryan, Mike, and special guest Todd Tomlinson from ServerLogic discuss Drupal news from the past week. Todd is the author of Beginning Drupal 7 from Apress Publishing. Rather than going with a standard interview with Todd, we decided to ask him to join us for one of our news-based podcasts. Listen in as we talk about Drush, Examiner.com, Todd's current and future book, and a bunch of other Drupal-related stuff.

Download Podcast 43
DrupalEasy_ep43_20100815.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

On March 11th I attended the first DrupalEasy Workshop in Orlando, Florida. I'm an experienced web developer who has recently picked up Drupal as a tool for helping to build high quality content-driven websites. Mike and Ryan were excellent teachers - they gave a thorough overview of a complex topic in a short space of time, and provided plenty of resources for us to continue learning. The workshop is essential for anyone who has previously configured a basic Drupal site and wishes to take their skills to an advanced level. I would not hesitate to recommend DrupalEasy.com training and hope to attend more workshops in the future.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Making Sure Your Redirects Work as Expected

Whenever you need to write a custom module that involves redirection using the drupal_goto() function, things can always get tricky - especially if there are other forces at work. One such force might be the "destination" variable that sometimes gets passed around in the URL querystring when the user is attempting to access content that requires authentication.

I recently ran across the situation where the "destination" querystring variable was interfering with where I was attempting to redirect the user to. Luckily, there was a simple solution - I just "unset" the "destination" variable right before I redirected the user:


unset($_REQUEST['destination']);
drupal_goto('somewhere_completely_different');

Using this method, I ensure that the redirect was "clean" and there wasn't any possibility of any misdirection.

Trackback URL for this post:

http://www.drupaleasy.com/trackback/204
No votes yet

No comments

Guest wrote 8 weeks 2 days ago

Glad I found this!

Mike, you told me to try the goto function to redirect to a view page, and it just wouldn't work. But I could tell it was not returing to after the goto call, so I knew something was fishy. Adding the unset did the trick!

Syndicate content