You are here

function _saml_sp__prepare in SAML Service Provider 8.2

Same name and namespace in other branches
  1. 7.8 saml_sp.module \_saml_sp__prepare()
  2. 7 saml_sp.module \_saml_sp__prepare()
  3. 7.2 saml_sp.module \_saml_sp__prepare()
  4. 7.3 saml_sp.module \_saml_sp__prepare()

Load the required OneLogin SAML-PHP toolkit files.

for some reason the OneLogin_Saml2_Constants class sometimes cannot be found find it and load it explicitely

1 call to _saml_sp__prepare()
saml_sp__get_metadata in ./saml_sp.module
load the settings and get the metadata

File

./saml_sp.module, line 348
SAML Service Provider

Code

function _saml_sp__prepare() {
  if (!class_exists('OneLogin_Saml2_Constants')) {
    $location = \Drupal::root() . '/vendor//onelogin/php-saml/lib/Saml2/Constants.php';
    if (file_exists($location)) {
      require_once $location;
    }
  }
}