Requirements
Creating the template
A template can be created by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click New
- Give the template a name
- Set Action to Import
- Set Component to Joomla Users
- Set Operation to User
- Click Next: Select Source
- Source is set default to Load from your computer. No need for change.
- Click Next: Select options
- The default values are OK, change if needed.
- Click Next: Select fields
- Nothing needed here as we set to Use column headers as configuration in step 10.
- Click Next: Finalize
- All done here
- Click Close to return to the list of templates or Edit if you want to fine-tune the template further.
Adding the template fields
Template fields can be added by following these steps:
- Go to Components -> RO CSVI -> Templates
- Click on Template fields
- In the Search Tools select your template
- Click on New to add a single field or click on Quick Add to add multiple fields.
Quick Add
The Quick Add Option allows you to quickly add multiple fields to a template. It is not possible to set any settings per field here but that can be done after the fields have been added to the template.
Required fields
- username
- usergroup_name / usergroup_path
- password / password_crypt
Criteria
Creating the import file
When importing user groups, use the field usergroup_name only if the usergroup has a unique name. If the groups are with same name but are under different parent group then it is adviced to use usergroup_path field. So usergroup_path field can have parent and child path of a group like Registered/Managergroup or Manager/Managergroup.
Run the import
The import can be run by following these steps:
- Go to Components -> RO CSVI -> Import
- Select the template created earlier
- Click Select file
- Select the file to import
- Click Preview
- You now see a preview of the file as to how RO CSVI sees the file
- Click Start import
- The import is run
- The Log details page will be shown with information regarding the import if the Enable logging is enabled in the template
Examples
"email";"username";"usergroup_name";"password";"usergroup_path"
"user1@localhost.loc";"User1";"Public";"letmein";"Registered/Managergroup"
"user2@localhost.loc";"User2";"Registered";"letmein";;"Registered/HRgroup"
"user3@localhost.loc";"User3";"Public";"letmein";"Registered/Workgroup"
To remove assigned user groups of a user, use usergroup_name_delete field with user group names seperated by | from which user needs to be removed from
"email";"username";"usergroup_name_delete"
"user1@localhost.loc";"Public|Registered"
"user2@localhost.loc";"Registered|Administrator"
CSVI also supports appending usergroups to a user from what he has been currently added. To do that in import template settings on Options tab set Append Usergroups option to Yes and save the template. Now when you import users with usergroup_name field, imported user groups will be appended to the current user groups user is assigned to.
Example file
Multi-Factor Authentication
In RO CSVI 8.5.0 we have added support for exporting and importing the multi-factor authentication data of users. You can recognize all these fields by their mfa_ prefix.
One word of caution, when migrating the multi-factor authentication form one site to another, this is dependent on the secret key of that specific site. The secret key can be found in the configuration.php of your site. As this should be unique per site, make sure to either remove the old site or change the secret key on the old site.
Further reading
Additionally CSVI also supports import of Joomla custom fields added for users. Each custom field will be available as an import field. If you dont see the field make sure that you update your available fields. Also note that alias of the custom field is used as import field as alias is unique. An example custom field import is explained below.
- Add an custom field from Joomla administrator menu > Users > Fields, For example add a custom field with Title User location
- Save the custom field
- Go to Components -> RO CSVI -> Available fields
- Update the available fields
- Go to Components -> RO CSVI -> Template fields
- Select your Joomla user import template
- Click on New button, search for the new custom field added. Save as a template field
- Run the import