You are here

function janrain_capture_url_outbound_alter in Janrain Registration 7

Same name and namespace in other branches
  1. 7.4 janrain_capture.module \janrain_capture_url_outbound_alter()
  2. 7.2 janrain_capture.module \janrain_capture_url_outbound_alter()
  3. 7.3 janrain_capture.module \janrain_capture_url_outbound_alter()

Implements hook_url_outbound_alter().

File

./janrain_capture.module, line 271
This module implements authentication endpoints for Janrain Capture.

Code

function janrain_capture_url_outbound_alter(&$path, &$options, $original_path) {

  // Override lougout link

  //var_dump($path);
  switch ($path) {
    case 'user/logout':
      $janrain_capture_optional = variable_get('janrain_capture_optional', array());

      //var_dump($janrain_capture_optional);
      if ($janrain_capture_optional['capture_sso_address'] && !isset($options['real_logout'])) {
        $path = 'javascript:CAPTURE.logout()';
        $options['external'] = TRUE;
      }
      break;
  }
}