You are here

function openid_connect_update_7100 in OpenID Connect / OAuth client 7

Converts client settings to the new format.

File

./openid_connect.install, line 19
Install, update, and uninstall functions for OpenID Connect module.

Code

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);
  }
}