You are here

function login_destination_redirect in Login Destination 5

Callback for login_redirect URL.

1 string reference to 'login_destination_redirect'
login_destination_menu in ./login_destination.module
Implementation of hook_menu().

File

./login_destination.module, line 119
Controls which URL users will be redirected upon login.

Code

function login_destination_redirect() {
  $destination = variable_get('ld_url_destination', 'user');
  if (variable_get('ld_url_type', LOGIN_DEST_STATIC) == LOGIN_DEST_SNIPPET) {
    ob_start();
    $url = eval($destination);
    ob_end_clean();
  }
  else {
    $url = $destination;
  }
  if (is_array($url)) {
    drupal_goto($url['path'], $url['query']);
  }
  else {
    drupal_goto($url);
  }
}