You are here

varbase_security.install in Varbase Core 8.4

Install, update and uninstall functions for the Varbase Security module.

File

modules/varbase_security/varbase_security.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the Varbase Security module.
 */

/**
 * Enable Password Policy module.
 */
function varbase_security_update_8001() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy',
    ], FALSE);
  }
}

/**
 * Enable Password Character Length Policy module.
 */
function varbase_security_update_8002() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy_length')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy_length',
    ], FALSE);
  }
}

/**
 * Enable Password Character Type Policy module.
 */
function varbase_security_update_8003() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy_characters')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy_characters',
    ], FALSE);
  }
}

/**
 * Enable Password Character Types Policy module.
 */
function varbase_security_update_8004() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy_character_types')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy_character_types',
    ], FALSE);
  }
}

/**
 * Enable Password Policy History module.
 */
function varbase_security_update_8005() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy_history')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy_history',
    ], FALSE);
  }
}

/**
 * Enable Password Username Policy module.
 */
function varbase_security_update_8006() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('password_policy_username')) {
    \Drupal::service('module_installer')
      ->install([
      'password_policy_username',
    ], FALSE);
  }
}

/**
 * Enable Security Kit module.
 */
function varbase_security_update_8007() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('seckit')) {
    \Drupal::service('module_installer')
      ->install([
      'seckit',
    ], FALSE);
  }
}

/**
 * Enable Security Review module.
 */
function varbase_security_update_8008() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('security_review')) {
    \Drupal::service('module_installer')
      ->install([
      'security_review',
    ], FALSE);
  }
}

/**
 * Enable Username Enumeration Prevention module.
 */
function varbase_security_update_8009() {
  if (!\Drupal::moduleHandler()
    ->moduleExists('username_enumeration_prevention')) {
    \Drupal::service('module_installer')
      ->install([
      'username_enumeration_prevention',
    ], FALSE);
  }
}

Functions

Namesort descending Description
varbase_security_update_8001 Enable Password Policy module.
varbase_security_update_8002 Enable Password Character Length Policy module.
varbase_security_update_8003 Enable Password Character Type Policy module.
varbase_security_update_8004 Enable Password Character Types Policy module.
varbase_security_update_8005 Enable Password Policy History module.
varbase_security_update_8006 Enable Password Username Policy module.
varbase_security_update_8007 Enable Security Kit module.
varbase_security_update_8008 Enable Security Review module.
varbase_security_update_8009 Enable Username Enumeration Prevention module.