You are here

function saml_sp_idp_load in SAML Service Provider 7.2

Same name and namespace in other branches
  1. 8.3 saml_sp.module \saml_sp_idp_load()
  2. 8.2 saml_sp.module \saml_sp_idp_load()
  3. 7.8 saml_sp.module \saml_sp_idp_load()
  4. 7 saml_sp.module \saml_sp_idp_load()
  5. 7.3 saml_sp.module \saml_sp_idp_load()
  6. 4.x saml_sp.module \saml_sp_idp_load()
  7. 3.x saml_sp.module \saml_sp_idp_load()

Load a single IDP. Also a menu argument loader.

Parameters

String $idp_machine_name:

Return value

Object

5 calls to saml_sp_idp_load()
saml_sp_drupal_login_form_user_login_alter in modules/saml_sp_drupal_login/saml_sp_drupal_login.module
Implements hook_form_FORM_ID_alter().
saml_sp_drupal_login_form_user_login_block_alter in modules/saml_sp_drupal_login/saml_sp_drupal_login.module
Implements hook_form_FORM_ID_alter().
saml_sp_drupal_login__get_idp in modules/saml_sp_drupal_login/saml_sp_drupal_login.module
Get the IDP configuration to use for Drupal Login via SAML.
saml_sp__endpoint in ./saml_sp.pages.inc
Page callback to complete the SAML authentication process. This is the consumer endpoint for all SAML authentication requests.
saml_sp__get_metadata in ./saml_sp.module
load the settings and get the metadata
1 string reference to 'saml_sp_idp_load'
saml_sp__configure_idp_form in ./saml_sp.admin.inc
Configure or add a SAML IDP.

File

./saml_sp.module, line 216
SAML Service Provider

Code

function saml_sp_idp_load($idp_machine_name) {
  if (variable_get('saml_sp__debug', FALSE)) {
    watchdog('saml_sp', __FUNCTION__ . ' - $idp_machine_name => <pre>@idp</pre>', array(
      '@idp' => print_r($idp_machine_name, TRUE),
    ), WATCHDOG_DEBUG);
  }
  $all_idps = saml_sp__load_all_idps();
  if (isset($all_idps[$idp_machine_name])) {
    $idp = $all_idps[$idp_machine_name];
    if (!isset($idp->machine_name)) {
      $idp->machine_name = $idp_machine_name;
    }
  }
  else {
    $idp = FALSE;
  }
  if (variable_get('saml_sp__debug', FALSE)) {
    watchdog('saml_sp', __FUNCTION__ . ' - $idp => <pre>@idp</pre>', array(
      '@idp' => print_r($idp, TRUE),
    ), WATCHDOG_DEBUG);
  }
  return $idp;
}