You are here

function cronkeychange_generate_submit in Cron key change 7

Same name and namespace in other branches
  1. 8 cronkeychange.module \cronkeychange_generate_submit()
  2. 2.x cronkeychange.module \cronkeychange_generate_submit()

Generate new cron key.

1 call to cronkeychange_generate_submit()
drush_cronkeychange in ./cronkeychange.drush.inc
Generate new cron key.
1 string reference to 'cronkeychange_generate_submit'
cronkeychange_form_system_cron_settings_alter in ./cronkeychange.module
Implements hook_form_FORM_ID_alter().

File

./cronkeychange.module, line 64
Cron Key Change

Code

function cronkeychange_generate_submit(&$form = array(), &$form_state = array()) {
  $cron_key = drupal_random_key();
  variable_set('cron_key', $cron_key);
  if (!drupal_is_cli()) {
    drupal_set_message(t('New cron key generated.'));
  }
  watchdog('Cron key change', 'New cron key generated.');
}