You are here

function hybridauth_get_provider_config in HybridAuth Social Login 7

Same name and namespace in other branches
  1. 6.2 hybridauth.module \hybridauth_get_provider_config()
  2. 7.2 hybridauth.module \hybridauth_get_provider_config()
2 calls to hybridauth_get_provider_config()
hybridauth_get_config in ./hybridauth.auth.inc
hybridauth_get_enabled_providers in ./hybridauth.auth.inc

File

./hybridauth.auth.inc, line 102

Code

function hybridauth_get_provider_config($provider_id, $enabled_only = TRUE) {
  $enabled = variable_get('hybridauth_provider_' . $provider_id . '_enabled', NULL);
  if (isset($enabled)) {
    if (!$enabled_only || $enabled) {
      return array(
        'enabled' => $enabled,
        'keys' => array(
          'id' => variable_get('hybridauth_provider_' . $provider_id . '_keys_id', ''),
          'key' => variable_get('hybridauth_provider_' . $provider_id . '_keys_key', ''),
          'secret' => variable_get('hybridauth_provider_' . $provider_id . '_keys_secret', ''),
        ),
        'scope' => variable_get('hybridauth_provider_' . $provider_id . '_scope', ''),
        'display' => variable_get('hybridauth_provider_' . $provider_id . '_display', 'popup'),
        'hauth_return_to' => url('hybridauth/endpoint'),
      );
    }
  }
  return NULL;
}