You are here

function _saml_sp__prepare in SAML Service Provider 7.3

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

Load the required OneLogin SAML-PHP toolkit files.

this function is a holdover from when the module didn't use libraries

4 calls to _saml_sp__prepare()
saml_sp_init in ./saml_sp.module
Implements hook_init().
saml_sp__admin_config in ./saml_sp.admin.inc
configure this SAML Service Provider
saml_sp__configure_idp_form in ./saml_sp.admin.inc
Configure or add a SAML IDP.
saml_sp__get_settings in ./saml_sp.module
Get the SAML settings for an IdP.

File

./saml_sp.module, line 744
SAML Service Provider

Code

function _saml_sp__prepare() {
  $library = libraries_load('php-saml');
  if ($library['installed'] === FALSE && user_access('configure saml sp')) {
    if (isset($library['error message']) && !empty($library['error message'])) {
      drupal_set_message($library['error message'], 'error', FALSE);
    }
    else {
      drupal_set_message(t('The %library library hasn\'t been installed. Please download it from <a href="!library_url" target="_blank">%library_url</a> and place it in %library_path', array(
        '%library' => $library['name'],
        '!library_url' => $library['vendor url'],
        '%library_url' => $library['vendor url'],
        '%library_path' => $library['library path'],
      )), 'warning', FALSE);
    }
  }
  return $library;
}