123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php
- /**
- * @file
- * Import and update users from a comma separated file (csv).
- */
- /**
- * Implementation of hook_schema().
- */
- function user_import_delete_schema() {
- $schema['user_import_delete'] = array(
- 'description' => t("Log of users that have been imported."),
- 'fields' => array(
- 'import_id' => array(
- 'description' => t("ID key of import."),
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'disp-width' => '10'
- ),
- 'uid' => array(
- 'description' => t("ID key of user imported."),
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'disp-width' => '10'
- ),
- 'cancellation_method' => array(
- 'description' => t("Account cancellation method."),
- 'type' => 'varchar',
- 'length' => '35',
- 'not null' => TRUE,
- 'default' => ''
- ),
- 'delete_ready' => array(
- 'description' => t("Flag user for deletion."),
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'disp-width' => '10'
- ),
- ),
- );
- return $schema;
- }
- /**
- * Change the account_key field to a standard uid field.
- */
- function user_import_delete_update_7000() {
- db_change_field('user_import_delete', 'account_key', 'uid',
- array(
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'description' => "ID key of user imported.",
- )
- );
- }
- /**
- * Add the delete ready flag field.
- */
- function user_import_delete_update_7001() {
- db_add_field('user_import_delete', 'delete_ready',
- array(
- 'description' => t("Flag user for deletion."),
- 'type' => 'int',
- 'not null' => TRUE,
- 'default' => 0,
- 'initial' => 0,
- 'disp-width' => '10'
- )
- );
- }
- /**
- * Add the cancellation method field.
- */
- function user_import_delete_update_7002() {
- db_add_field('user_import_delete', 'cancellation_method',
- array(
- 'description' => t("Account cancellation method."),
- 'type' => 'varchar',
- 'length' => '35',
- 'not null' => TRUE,
- 'default' => ''
- )
- );
- }
- /**
- * Clear all in progress deletes. IMPORTANT: Please redo the previous import if you want to delete unwanted accounts.
- */
- function user_import_delete_update_7003() {
- db_delete('user_import_delete')->execute();
- }
|