Documentation

  1. Create a CSV file with the columns you want to import into concrete5. Format should be standard comma-separated-values with first row as header.
    • Columns can be named anything you'd like, but for auto-mapping, they should be titled the same as the attribute handle. System columns should be named "username", "email", "password", "avatar", and "groups" in order to be auto-mapped.
    • At the very least, there needs to be a column for email addresses.
    • Select attribute values (for multi-select) and group names should be separated by pipes (|). For example, "Administrators|Other Group" or "Option One|Option Five".
    • File attributes (both avatars and attributes of the type "file") should be provided as a filename relative to your incoming directory. For example, to import an avatar, specify "avatar-james.png" in the CSV field and copy the file to [c5root]/files/incoming/avatar-james.png.
    • Address attribute values should also be separated by pipes (|) in the format "address line 1|address line 2|city|state or province|two letter country ISO code|postal code". Country ISO codes are a common format; the master list for concrete5 is stored in concrete/helpers/lists/countries.php.
    • Boolean (checkbox) attributes should contain some sort of "postive" value (using "yes" is a good choice) for "checked", and be left empty for unchecked.
  2. Go to /dashboard/users/limport on your site (or look under the "Members" heading) and upload the CSV file.
  3. Mapping -- The left column lists the fields you can import into, with the core fields on top and your user attributes on the bottom. Based on naming conventions, field mapping has been suggested, with the CSV column name contained within the field/attribute box. After you're finished, click the button to preview the import.
    • To create a new mapping, drag the CSV column to the field's box.
    • To remove an existing mapping, click the (x) on the right of the column name.
  4. Preview the results of the import.
  5. Review the results of the import.

Importing Memberships

If you have the membership commerce add-on to manage your user's memberships in groups, you can import that membership information.

Simply create a "memberships" column in your import file and provide the name of the product (this is assuming that your product names are unique, and that they don't have semicolons (;) in the name, which we'll get to in a moment).

If the membership start date is in the past, you can provide that too. Just add a semicolon and then the date in an unambigous and English format. Note that you need to specify the start (or purchase) date.

So, if you have a product called "VIP Videos" and which has a duration of 3 months, and you wish your users' memberships to expire next month, on May 1, 2014, your cell value should be:

VIP Videos;2014-02-01

Lastly, note that you should not also add the user to the groups that the membership will place them in -- let the membership add-on do that automatically.

Welcome Emails

You can send a welcome email to newly created users with their username and password. This email will even include their automatically-generated password, which is otherwise inaccessible (as it gets encrypted).

To send welcome emails, check the box on the initial page.

The email text is very generic. You can customize it by overriding the template (copy [site root]/packages/lerteco_user_importer/mail/user_import_welcome.php to [site roote]/mail/user_import_welcome.php). Use the UserInfo object to add whatever values you want. For example, <?= $ui->getAttribute('last_name') ?>