{% extends "authentic2/manager/base.html" %} {% load i18n gadjo staticfiles %} {% block page-title %}{{ block.super }} - {% trans "Import Users" %}{% endblock %} {% block page_title %}{% trans "Imports" %}{% endblock %} {% block breadcrumb %} {{ block.super }} {% trans 'Users' %} {% trans 'Import Users' %} {% endblock %} {% block sidebar %} {% endblock %} {% block content %}
{% trans "Filename" %} | {% trans "Creation date" %} | {% trans "By" %} | {% trans "Rows" %} | |
---|---|---|---|---|
{{ import.filename }} | {{ import.created }} | {{ import.user }} | {{ import.rows_count }} | |
{% trans "None" %} |
{% blocktrans trimmed %} The first line of your CSV file must be a header mapping columns to user's attributes identifier. Each user attribute name can be followed by flags separated by spaces. You can also import an external identifier to prevent creating duplicates when doing multiple import from the same source. {% endblocktrans %}
{% trans "Label" %} | {% trans "Identifier" %} |
---|---|
{{ column.label }} | {{ column.name }} |
{% blocktrans trimmed %}Each column can receive flags after its name, separated by spaces. Each modifier can be prefixed by no- to set its value to false.{% endblocktrans %}
{% trans "Flag" %} | {% trans "Meaning" %} | {% trans "Default value" %} |
---|---|---|
key | {% blocktrans trimmed %} The column is an import key, it is used to match the row with an existing user. Only one column can be an import key. {% endblocktrans %} | {% trans "False" %} |
create | {% blocktrans trimmed %} Values will be used when creating a new user. {% endblocktrans %} | {% trans "True" %} |
update | {% blocktrans trimmed %} Values will be used when updating an existing user. {% endblocktrans %} | {% trans "True" %} |
unique | {% blocktrans trimmed %} Values must be unique in the target organizational unit. {% endblocktrans %} | {% trans "False" %} {% blocktrans trimmed %} (default is True for the email and username columns if they are configured to be unique in the target organizational unit) {% endblocktrans %} |
globally-unique | {% blocktrans trimmed %} Values must be unique among all users. {% endblocktrans %} | {% trans "False" %} {% blocktrans trimmed %} (default is True for the email and username columns if they are configured to be globally unique) {% endblocktrans %} |
verified | {% blocktrans trimmed %} Values are verified. User's attribute will be locked. {% endblocktrans %} | {% trans "False" %} {% blocktrans %}(default is True for the email column){% endblocktrans %} |
{% blocktrans trimmed %} You can also use two special columns _source_name and _source_id. _source_name must be the name of the source directory from which the users are exported, it must not change between imports. _source_id is the unique identifier from the source directory from which the users are extracted, it must not change between imports and should never be reused for different users. _source_id is automatically the key column, and you cannot use another key column. {% endblocktrans %}
{% blocktrans trimmed %}Importing first and last name of users keyed by email{% endblocktrans %}
"email key",first_name,last_name john.doe@example.com,John,Doe
{% blocktrans trimmed %}Importing verified first and last name of users keyed by email{% endblocktrans %}
"email key","first_name verified","last_name verified" john.doe@example.com,John,Doe
{% blocktrans trimmed %}Importing email, family_reference, first and last name of users from application app1, ensuring family_reference is unique.{% endblocktrans %}
_source_name,_source_id,email,"family_reference unique",first_name,last_name app1,1,john.doe@example.com,1234,John,Doe