You are here

drupalauth4ssp.post_update.php in DrupalAuth for SimpleSAMLphp 8

Post update hooks for drupalauth4ssp.

File

drupalauth4ssp.post_update.php
View source
<?php

/**
 * @file
 * Post update hooks for drupalauth4ssp.
 */

/**
 * Add the authsource configuration parameter.
 */
function drupalauth4ssp_post_update_add_authsource_param() {
  $config = \Drupal::service('config.factory')
    ->getEditable('drupalauth4ssp.settings');
  if (!$config
    ->get('authsource')) {
    $config
      ->set('authsource', 'drupal-userpass')
      ->clear('cookie_name')
      ->save();
  }
}

Functions

Namesort descending Description
drupalauth4ssp_post_update_add_authsource_param Add the authsource configuration parameter.