You are here

function drupalauth4ssp_include_simplesamlphp_library in DrupalAuth for SimpleSAMLphp 7

Include simpleSAMLphp library.

Return value

bool Display whether library has been included or not.

1 call to drupalauth4ssp_include_simplesamlphp_library()
_drupalauth4ssp_get_simplesamlphp_config in ./drupalauth4ssp.module
Returns the SimpleSAMLphp configuration.

File

./drupalauth4ssp.module, line 200
DrupalAuth For simpleSAMLphp module.

Code

function drupalauth4ssp_include_simplesamlphp_library() {

  // Get the simplesamlphp session.
  $basedir = drupalauth4ssp_get_simplesamlphp_library_dir();
  $autoload_file = $basedir . '/lib/_autoload.php';

  // If variable is not defined or dir is not exist.
  if (!strlen($basedir) || !file_exists($basedir) || !file_exists($autoload_file)) {
    return FALSE;
  }
  require_once $basedir . '/lib/_autoload.php';
  return TRUE;
}