.. _project-export-import-users: Users management **************** In ``project.xml``, when we have to refer to a user the pattern is the following ``identifier`` where ``format`` can either be: - ``id`` a user unique id (integer) - ``username`` a user unique login name (string) - ``ldap`` user reference in LDAP, useful for in house data migration (string) You can pick whatever format you want. .. important:: Anonymous users Another format can be used: ``email``. This is only to reference anonymous users on the source instance. At import time, if the email match an existing user, it will be used (instead of treating the user as anonymous). As soon as you reference a user in ``project.xml``, this user must be defined in ``users.xml`` like: .. sourcecode:: xml 101 john_doe The 5 nodes should be present but the most important are ``username``, ``realname`` and ``email`` those elements will be used to decide whether the user already exists on the platform or not (and create the corresponding account if needed). ``id`` should be unique but will only be used if you are using ``123`` references in project.xml. We recommend to have a numeric sequence (1, 2, 3...) here. ``ldapid`` can be empty but if you move data from one service to another within the same organization, this might be useful to share the user base. This should be the unique identifier of the user in LDAP. Possible values from LDAP fields ``uid``, ``uuid``, etc. 99% of the time it's the unique part of LDAP ``dn``. Example of users.xml: .. sourcecode:: xml 101 john_doe 102 alice .. danger:: if a user in ``project.xml`` is not referenced in ``users.xml`` then the script will stop during the import, leading to half imported data.