You are here

function janrain_capture_configured in Janrain Registration 7

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

Checks whether the module has been configured.

4 calls to janrain_capture_configured()
janrain_capture_block_view_user_login_alter in ./janrain_capture.module
Implements hook_block_view_MODULE_DELTA_alter().
janrain_capture_init in ./janrain_capture.module
Implements hook_init().
janrain_capture_ui_block_view in ./janrain_capture_ui.module
Implements hook_block_view().
janrain_capture_ui_init in ./janrain_capture_ui.module
Implements hook_init().

File

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

Code

function janrain_capture_configured() {
  $configured =& drupal_static(__FUNCTION__, NULL);
  if (is_null($configured)) {
    $janrain_capture_main = variable_get('janrain_capture_main', array());

    // Make sure we at least have non-empty values for the basic configuration
    // settings.
    $address = isset($janrain_capture_main['capture_address']) && !empty($janrain_capture_main['capture_address']);
    $client_id = isset($janrain_capture_main['capture_client_id']) && !empty($janrain_capture_main['capture_client_id']);
    $client_secret = isset($janrain_capture_main['capture_client_secret']) && !empty($janrain_capture_main['capture_client_secret']);
    $configured = $address && $client_id && $client_secret;
  }
  return $configured;
}