email_required.install 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. /**
  3. * Implements of hook_schema().
  4. */
  5. function email_required_schema() {
  6. $schema = array();
  7. $schema['email_required'] = array(
  8. 'description' => 'Track which users have validated their email address.',
  9. 'fields' => array(
  10. 'uid' => array(
  11. 'description' => 'The unique ID of the content, such as either the {cid}, {uid}, or {nid}.',
  12. 'type' => 'int',
  13. 'unsigned' => TRUE,
  14. 'not null' => TRUE,
  15. 'default' => 0,
  16. ),
  17. 'hash' => array(
  18. 'description' => 'The hash that will be needed to verify the email',
  19. 'type' => 'varchar',
  20. 'length' => '255',
  21. 'not null' => TRUE,
  22. 'default' => '',
  23. ),
  24. 'created' => array(
  25. 'description' => 'The UNIX time stamp representing when the hash was made.',
  26. 'type' => 'int',
  27. 'unsigned' => TRUE,
  28. 'not null' => TRUE,
  29. 'default' => 0,
  30. ),
  31. 'verified' => array(
  32. 'description' => 'The UNIX time stamp representing when the email was verified.',
  33. 'type' => 'int',
  34. 'unsigned' => TRUE,
  35. 'not null' => TRUE,
  36. 'default' => 0,
  37. ),
  38. ),
  39. 'primary key' => array('uid'),
  40. );
  41. return $schema;
  42. }
  43. /**
  44. * Implements hook_uninstall().
  45. */
  46. function email_required_uninstall() {
  47. variable_del('email_required_paths');
  48. variable_del('email_required_email_subject');
  49. variable_del('email_required_email_body');
  50. }