# User Import/Export XEP-0227 compliant Plugin Readme

## Overview

The user import/export plugin provides a way to import and export Openfire user data via the Admin Console. This plugin use for its migration the XEP-0227 standard to be able to migrate its list of users from other Jabber/XMPP compliant based systems.

This plugin is based in the original plugin developed by Ryan Graham. It was modified by Vidal Santiago Martinez (from ProcessOne) to export to a XML file in the XEP-0227 format. If you are migrating to ejabberd, check additional details in: ejabberd migration kit. The existing feature to import XML file was not modified, so it is not capable of importing XEP-0227 files.

## Installation

Copy the OpenfireExporter.jar into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new OpenfireExporter.jar file over the existing file.

## Configuration

Nothing to do

## Using the Plugin

The plugin is accessed via the "User Import & Export XEP-0227 compliant" sidebar item located under the "Users/Groups" tab in the Admin Console. Note: if you are using a read-only user store such as LDAP or POP3 this plugin will still work with two caveats:

1. When exporting, the username will be placed in the password element.
2. When importing, no new users will be created but if the user exists in the user store their roster will be loaded.
3. Importing - Select the "Import User Data" option from the user import/export selection page. On the import page, use the "Browse" button to locate the file that contains the user information you want to locate and then click on the "Import" button. If the plugin is successful in importing all user data, you will be presented with the message: "All users added successfully". If the plugin was not successful in importing all user data you, will receive a message indicating what might have gone wrong. If during the import process, the plugin detects that you are trying to import a user that already exists in the system, it will not import that user or any roster information, except in the case of using a read-only user store.
4. Exporting - Select the "Export User Data" option from the user import/export selection page. User data can be exported either to a file or directly to the screen. To export to a file, select the "To File" radio button, enter the name you want your export file to be called in the "Export File Name" and then click on the "Export" button. Note: the plugin will automatically append an ".xml" extension to the file name if it is not already present. To export to the screen, select the "To Screen" radio button and then click on the "Export" button. The user data will be placed in the provided text area.
5. Migration - To import user data from another instant messaging system using the plugin, the import file must conform to the wildfire-user-schema.xsd schema file (located in the classes directory of the OpenfireExporter.jar). When importing a user data file the plugin will first validate the file against the schema file. If the plugin cannot validate the import file the user data will not be imported. During the import process the plugin gives you the ability to update user roster entries domain names to server name of your Openfire installation. For example, say you have a user whose roster looks like:

## Example

<?xml version="1.0" encoding="UTF-8"?> <server-data xmlns="http://www.xmpp.org/extensions/xep-0227.html#ns"> <host jid="example.org"> <user name="testuser1" password="testuser1"> <query xmlns="jabber:iq:roster"> <item jid="testuser1@example.org" name="testuser1" subscription="both"> <group/> </item> </query> </user> <user name="santiago" password="santiago"> <query xmlns="jabber:iq:roster"> <item jid="smartinez@example.org" name="santiago" subscription="both"> <group/> </item> </query> <vCard xmlns="vcard-temp"> <FN>Vidal Santiago Martinez</FN> <NICKNAME>Santiago</NICKNAME> <EMAIL>smartinez@example.org</EMAIL> <URL>www.process-one.net</URL> </vCard> </user> </host> </server-data>