You are here

function auth0_check_dependencies in Auth0 Single Sign On 7.2

Check that the dependencies were autoloaded.

4 calls to auth0_check_dependencies()
auth0_advanced_settings_form in ./auth0.module
The Auth0 advanced configuration settings form callback.
auth0_basic_settings_form in ./auth0.module
The Auth0 basic configuration settings form callback.
auth0_enabled in ./auth0.module
Determine if Auth0 is enabled and can be used.
auth0_user_info_page in ./auth0.module
Display auth0 info for the given user.

File

./auth0.module, line 1111

Code

function auth0_check_dependencies() {
  if (class_exists('\\Auth0SDK\\Auth0')) {
    return TRUE;
  }
  if (file_exists(DRUPAL_ROOT . '/' . drupal_get_path('module', 'auth0') . '/vendor/autoload.php')) {
    require_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'auth0') . '/vendor/autoload.php';
    return TRUE;
  }
  return FALSE;
}