function key_install in Key 7
Implements hook_install().
File
- ./
key.install, line 111 - Install, update and uninstall functions for the Key module.
Code
function key_install() {
// Add a randomly generated default key.
$fields = array(
'name' => 'default',
'label' => 'Default',
'description' => 'A randomly generated basic key.',
'type' => 'general',
'provider' => 'variable',
'provider_settings' => array(
'variable_name' => 'default',
),
);
$key = drupal_random_key();
key_save_config($fields, $key, FALSE, FALSE);
}