Like that you can preserve the data on url change and redirect whenever.

FOr ex, on separated login and register page, we can go from 'login' page to 'register' page and we have the session var, which we can use to redirect once register is done.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RaulMuroc’s picture

FileSize
0 bytes
RaulMuroc’s picture

FileSize
783 bytes
m.lebedev’s picture

Thanks! it work

maximpodorov’s picture

Maybe the following fragment is required also to complete the bug solution:

/**
 * Implements hook_user_login().
 */
function r4032login_user_login(&$edit, $account) {
  if (!empty($_SESSION['destination_path']) && isset($_GET['destination']) && ($_GET['destination'] != $_SESSION['destination_path'])) {
    $_GET['destination'] = $_SESSION['destination_path'];
  }
}
deekayen’s picture

Status: Active » Needs review

This wasn't marked for review, so I didn't even know to look at it.