Posted By

Onfire60 on 12/05/10


links drupal

Versions (?)

Using drupal_get_destination() in a link item "l()"

 / Published in: PHP

When adding a link to a form say for instance a login form you can use drupalgetdestination() to return the user to the page they were on when they finish loging in. This show you how to do this programatically in a link l(); function.

  1. global $base_url;
  2. l("Member Login", $base_url."/user/login?".drupal_get_destination()),);

Report this snippet  

You need to login to post a comment.