You are here

miniorange_saml.install in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 7

Same filename and directory in other branches
  1. 8 miniorange_saml.install

File

miniorange_saml.install
View source
<?php

/**
 * @file
 * Installation file for miniOrange SAML Module.
 */
include 'miniorange_saml_feedback.php';

/**
 * Implements hook_uninstall().
 */
function miniorange_saml_uninstall() {
  variable_del('miniorange_saml_status');
  variable_del('miniorange_saml_customer_admin_email');
  variable_del('miniorange_saml_customer_admin_phone');
  variable_del('miniorange_saml_customer_admin_token');
  variable_del('miniorange_saml_customer_id');
  variable_del('miniorange_saml_customer_api_key');
  variable_del('miniorange_saml_idp_name');
  variable_del('miniorange_saml_sp_issuer');
  variable_del('miniorange_saml_idp_issuer');
  variable_del('miniorange_saml_default_role');
  variable_del('miniorange_saml_idp_login_url');
  variable_del('miniorange_saml_idp_x509_certificate');
  variable_del('miniorange_saml_response_signed');
  variable_del('miniorange_saml_assertion_signed');
  variable_del('miniorange_saml_enable_login');
  variable_del('miniorange_saml_auto_redirect_to_idp');
  variable_del('miniorange_saml_proxy_host');
  variable_del('miniorange_saml_proxy_port');
  variable_del('miniorange_saml_proxy_username');
  variable_del('miniorange_saml_proxy_password');
  variable_del('mo_saml_tourTaken_miniorange_saml');
  variable_del('mo_saml_tourTaken_idp_setup');
  variable_del('mo_saml_tourTaken_sp_setup');
  variable_del('mo_saml_tourTaken_signon_settings');
  variable_del('mo_saml_tourTaken_mapping_config');
  variable_del('mo_saml_tourTaken_export_config');
  variable_del('mo_saml_tourTaken_proxy_setup');
  variable_del('mo_saml_tourTaken_undefined');
  variable_del('mo_saml_tourTaken_customer_setup');
  variable_del('miniorange_saml_username_attribute');
  variable_del('miniorange_saml_login_by');
  variable_del('miniorange_saml_enable_rolemapping');
  variable_del('miniorange_saml_email_attribute');
  variable_del('miniorange_nameid_format');
  unset($_SESSION['mo_other']);
}

/**
 * Implements hook_install().
 */
function miniorange_saml_install() {
  variable_set('miniorange_saml_email_attribute', 'NameID');
  variable_set('miniorange_saml_username_attribute', 'NameID');
  user_save(user_load(1), array(
    'data' => array(
      'overlay' => 0,
    ),
  ));
}

/**
 * Implements hook_disable().
 */
function miniorange_saml_disable() {
  if (!isset($_SESSION['mo_other'])) {
    $_SESSION['mo_other'] = "False";
  }
  miniorange_saml_feedback();
}

/**
 * Implementations of hook_update_N().
 */

/**
 * Remove a deprecated variable.
 */
function miniorange_saml_update_7100() {
  variable_del('miniorange_saml_enable_sign_check');
}

Functions