You are here

function captcha_install in CAPTCHA 6

Same name and namespace in other branches
  1. 8 captcha.install \captcha_install()
  2. 5.3 captcha.install \captcha_install()
  3. 6.2 captcha.install \captcha_install()
  4. 7 captcha.install \captcha_install()

Implementation of hook_install().

File

./captcha.install, line 31

Code

function captcha_install() {
  drupal_install_schema('captcha');

  // insert some defaults
  $form_ids = array(
    'comment_form',
    'contact_mail_user',
    'contact_mail_page',
    'user_register',
    'user_pass',
    'user_login',
    'user_login_block',
  );
  foreach ($form_ids as $form_id) {
    db_query("INSERT INTO {captcha_points} (form_id, module, type) VALUES ('%s', NULL, NULL)", $form_id);
  }
  drupal_set_message(t('You can now <a href="!captcha_admin">configure the CAPTCHA module</a> for your site.', array(
    '!captcha_admin' => url('admin/user/captcha'),
  )), 'status');
}