You are here

function domain_goto in Domain Access 5

Same name and namespace in other branches
  1. 6.2 domain.module \domain_goto()
  2. 7.3 domain.module \domain_goto()
  3. 7.2 domain.module \domain_goto()

Determine if we must switch the active domain.

This function will execute a drupal_goto() to pop users to the correct domain.

Parameters

$domain: The currently active $domain array, provided by domain_lookup().

9 calls to domain_goto()
domain_batch in ./domain_admin.inc
Allows for the batch update of certain elements.
domain_conf_page in domain_conf/domain_conf.module
The domain conf page callback router.
domain_content_view in domain_content/domain_content.module
Content administration for a specific domain. This callback puts the user on the current domain and then fetches the appropirate content for batch editing.
domain_edit in ./domain_admin.inc
Edit an existing domain record
domain_form_alter in ./domain.module
Implement hook_form_alter()

... See full list

File

./domain.module, line 647
Core module functions for the Domain Access suite.

Code

function domain_goto($domain) {
  global $_domain;

  // We must be on the proper domain, see http://drupal.org/node/186153.
  if ($domain != -1 && $_domain['domain_id'] != $domain['domain_id']) {
    $path = domain_get_uri($domain);
    drupal_goto($path);
  }
}