You are here

function lockr_update_7300 in Lockr 7.3

Migrate wrapping keys to config.

File

./lockr.install, line 53
Install, uninstall, and update functions for lockr.

Code

function lockr_update_7300() {
  $keys = key_get_keys_by_provider('lockr');
  $secret_info = [];
  foreach ($keys as $id => $key) {
    $secret_info[$id] = [
      'wrapping_key' => $key['key_provider_settings']['encoded'],
    ];
  }
  if ($secret_info) {
    variable_set('lockr_secret_info', $secret_info);
  }
}