You are here

function genpass_update_7200 in Generate Password 7.2

Document and then remove legacy variables.

File

./genpass.install, line 11
Genpass module upgrade/uninstall code.

Code

function genpass_update_7200() {
  $variables = array(
    'genpass_algorithm',
    'genpass_display',
    'genpass_entropy',
    'genpass_length',
    'genpass_mode',
  );
  foreach ($variables as $variable) {
    $value = json_encode(variable_get($variable, t('Not applicable: the variable was unset')));
    watchdog('genpass', 'The legacy variable @variable had value @value', array(
      '@variable' => $variable,
      '@value' => $value,
    ), WATCHDOG_INFO);
    variable_del($variable);
  }
  watchdog('genpass', 'All legacy genpass module variables have been deleted. Their prior values were recorded.', array(), WATCHDOG_WARNING);
}