You are here

function hybridauth_get_instance in HybridAuth Social Login 7

Same name and namespace in other branches
  1. 6.2 hybridauth.module \hybridauth_get_instance()
  2. 7.2 hybridauth.module \hybridauth_get_instance()
  3. 7.2 hybridauth.api.php \hybridauth_get_instance()
1 call to hybridauth_get_instance()
hybridauth_popup in ./hybridauth.pages.inc

File

./hybridauth.auth.inc, line 56

Code

function hybridauth_get_instance() {
  $controller =& drupal_static(__FUNCTION__, NULL);
  if (!isset($controller)) {
    $controller = FALSE;
    $lib_path = libraries_get_path('hybridauth', FALSE);
    if ($lib_path) {

      //try {
      require_once $lib_path . '/Hybrid/Auth.php';
      $config = hybridauth_get_config();
      $controller = new Hybrid_Auth($config);

      //}

      //catch(Exception $e) {

      // TODO: How should we handle this?

      //watchdog_exception('hybridauth', $e);

      //}
    }
  }
  return $controller;
}