README.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. ********************************************************************
  2. D R U P A L M O D U L E
  3. ********************************************************************
  4. Name: User Import Module
  5. Author: Robert Castelo <www.codepositive.com>
  6. Drupal: 7.x
  7. ********************************************************************
  8. DESCRIPTION:
  9. Import users into Drupal from a CSV file (Comma Separated File).
  10. Features include:
  11. * Creates an account for each user
  12. * Match CSV columns to profile fields.
  13. * Can optionally use the file's first row to map csv data to user profile fields
  14. * Option to create Usernames based on data from file, e.g. "John" + "Smith" => "JohnSmith"
  15. * Usernames can be made of abbreviated data from file, e.g. "Jane" + "Doe" => "JDoe"
  16. * Option to create random, human readable, Usernames
  17. * Option to import passwords
  18. * Option to create random passwords for each user
  19. * Can set user roles
  20. * Option to send welcome email, with account details to each new user
  21. * Can set each user's contact form to enabled
  22. * Test mode option to check for errors
  23. * Processing can be triggered by cron or manually by an administrator
  24. * Can stagger number of users imported, so that not too many emails are sent at one time
  25. * Multiple files can be imported/tested at the same time
  26. * Import into Organic Groups
  27. * Import into Node Profile
  28. * Option to make new accounts immediately active, or inactive until user logs in
  29. * Use CSV file already uploaded through FTP (useful for large imports)
  30. * Designed to be massively scalable
  31. ** Supported CSV File Formats **
  32. The following settings are necessary when saving a csv file which will be used for the import.
  33. File needs to be saved as "Character Set: Unicode (UTF-8)".
  34. Field delimiter: ,
  35. - can be configured as something else, a comma is the default though.
  36. Text delimiter: "
  37. - if there's an option to quote all text cells, enable it.
  38. The 'Windows line endings' setting complies with all of the above.
  39. If file import fails with "File copy failed: source file does not exist." try
  40. setting the file extension to .txt.
  41. ** IMPORTANT **
  42. - Note that Date fields are not yet supported.
  43. - Note that passwords can only be imported as plain text, and will be converted to MD5 by Drupal.
  44. - Note that if your data contains a backslash before the column separator it may not get imported as expected:
  45. "123","abc\","def"
  46. The second field will be imported as: abc","def
  47. This has been fixed in PHP 5.3
  48. ********************************************************************
  49. PREREQUISITES:
  50. Must have customised Profile fields already entered
  51. if data is to be imported into user profiles.
  52. ********************************************************************
  53. INSTALLATION:
  54. Note: It is assumed that you have Drupal up and running. Be sure to
  55. check the Drupal web site if you need assistance.
  56. 1. Place the entire user_import directory into your Drupal directory:
  57. sites/all/modules/
  58. 2. Enable the user_import modules by navigating to:
  59. administer > modules
  60. Click the 'Save configuration' button at the bottom to commit your
  61. changes.
  62. 3. IMPORTANT - Navigate to:
  63. admin/config/media/file-system
  64. Set the 'Private file system path' field.
  65. ********************************************************************
  66. CONFIGURATION:
  67. Configuration for User Import:
  68. 'People'
  69. -- 'Import'
  70. -- 'Configure' (admin/people/user_import/configure)
  71. * Uploads Directory
  72. This option provides a directory where files can be uploaded, and then selected when setting up
  73. an import. The uploads directory will be in your Private files directory:
  74. [path to private files]/user_import/uploads/selectable
  75. * Automated Imports
  76. If this is set then each import template will have the option to create a matching directory which
  77. will be scanned for any files that have been uploaded to it, and when a file is found it will
  78. automatically be used to create new user accounts. Directories are scanned during cron runs.
  79. Scanned directories will be in:
  80. [path to private files]/user_import/uploads/[name of directory]
  81. ********************************************************************
  82. USAGE
  83. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  84. For more detailed instructions (with pictures) please go to the
  85. documentation pages for this module:
  86. http://drupal.org/node/137653
  87. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  88. 1. To set permissions of who can import users into the site, navigate to:
  89. 'People'
  90. -- 'Permissions'
  91. -- 'User Import'
  92. -- 'Import users' (admin/people/permissions)
  93. 2. To import users, navigate to:
  94. 'People'
  95. -- 'Import'
  96. -- 'New Import' (admin/people/user_import/add)
  97. * Note that Drupal may require its caches to be flushed before the User Import menu options appear
  98. 3. Press the 'browse' button to select a file to import,
  99. or select a file already added through FTP.
  100. 5. Click on Next.
  101. 6. Use the "Use Different CSV File" fieldset to remove and add a different CSV file
  102. 7. Under Field Match you should see the various columns from your profile page.
  103. 8. For each csv column select a Drupal field to map.
  104. 9. Under username select 'No', if the field is not to be used to generate the username, or select '1' - '4'
  105. for the order to use the field in generating username.
  106. Example: 'LastName' and 'FirstName' are fields to be used as username. So under the username
  107. selection chose '1' for 'FirstName' and '2' for 'Lastname', and the username generated will be in
  108. the form 'FirstNameLastName'.
  109. 10. Under Options you should see Ignore First Line ( use if the first row are labels ),
  110. Contact, and Send Email. Select whichever is appropiate.
  111. 11. Under Role Assign select the roles the imported users will be assigned.
  112. 12. Under Email Message, you can override the default message sent to new users. Leave blank to use the default message.
  113. 13. Under Update Existing Users, you can set whether existing users matching ones from the CSV file will be updated, replaced or added.
  114. 12. Under Save Settings, you can save your settings for use on future imports.
  115. 13. Click "Test" to do an import without committing changes to the database. Fix any errors that are generated.
  116. 14. Click "Import" to complete the import.
  117. ********************************************************************
  118. AUTHOR CONTACT
  119. - Report Bugs/Request Features:
  120. http://drupal.org/project/user_import
  121. - Comission New Features:
  122. http://drupal.org/user/3555/contact
  123. - Want To Say Thank You:
  124. http://www.amazon.com/gp/registry/O6JKRQEQ774F
  125. ********************************************************************
  126. ACKNOWLEDGEMENT
  127. - I looked at a script by David McIntosh (neofactor.com) before coding this module.
  128. - Documentation help Steve (spatz4000)
  129. - patch by mfredrickson
  130. - patch by idealso
  131. - code from Nedjo Rogers
  132. ********************************************************************
  133. SPONSORS