You are here

function login_destination_perform_redirect in Login Destination 7

Same name and namespace in other branches
  1. 8.2 login_destination.module \login_destination_perform_redirect()
  2. 8 login_destination.module \login_destination_perform_redirect()

Evaluate rules and perform redirect.

This function is intended to be used by external modules.

Parameters

string $trigger: Action of login destination rule.

string $current: Path, if null $_GET['q'] is used.

4 calls to login_destination_perform_redirect()
login_destination_submit in ./login_destination.module
Helper submit function.
login_destination_user_insert in ./login_destination.module
Implements hook_user_insert().
login_destination_user_login in ./login_destination.module
Implements hook_user_login().
login_destination_user_logout in ./login_destination.module
Implements hook_user_logout().

File

./login_destination.module, line 384
Control where users are directed to, once they login

Code

function login_destination_perform_redirect($trigger = '', $current = NULL) {
  $destination = login_destination_get_destination($trigger, $current);

  // Check if we redirect.
  if ($destination !== FALSE) {
    login_destination_prepare_goto($destination);
  }
}