You are here

openid_connect.install in OpenID Connect / OAuth client 7

Same filename and directory in other branches
  1. 8 openid_connect.install
  2. 2.x openid_connect.install

Install, update, and uninstall functions for OpenID Connect module.

File

openid_connect.install
View source
<?php

/**
 * @file
 * Install, update, and uninstall functions for OpenID Connect module.
 */

/**
 * Implements hook_uninstall().
 */
function openid_connect_uninstall() {
  db_delete('variable')
    ->condition('name', 'openid_connect%', 'LIKE')
    ->execute();
  cache_clear_all('variables', 'cache_bootstrap');
}

/**
 * Converts client settings to the new format.
 */
function openid_connect_update_7100() {
  foreach (openid_connect_get_plugins(TRUE) as $client) {
    $client_id = variable_get('openid_connect_client_' . $client['name'] . '_client_id', '');
    $client_secret = variable_get('openid_connect_client_' . $client['name'] . '_client_secret', '');
    $new_configuration = array(
      'client_id' => $client_id,
      'client_secret' => $client_secret,
    );
    variable_set('openid_connect_client_' . $client['name'], $new_configuration);
  }
}

Functions

Namesort descending Description
openid_connect_uninstall Implements hook_uninstall().
openid_connect_update_7100 Converts client settings to the new format.