Users XML Plugin - Unable to import users

OJS V3.1.0.1
I am trying to import users with the Users XML Plugin but i cannot find the correct syntax for XML.

My XML file Captura

Premature end of data in tag PKPUsers line 2
The document has no document element.

If I use this XML file:

I get the following error:
Element ‘users’: No matching global declaration available for the validation root.

Can anybody tell me the correct syntax for XML???

1 Like

Hi @Erick,

Have you worked with plugins/importexport/users/sample.xml? (Make sure you’re using a validating XML editor – running your document through a validator before importing it into OJS will help a lot in the debugging process.)

Alec Smecher
Public Knowledge Project Team

Thanks Alec
Based in the simple.xml format I was able to import users, but there is no way to set a standard password for imported users.

I want to set “123456” password for all imported users but I can’t find the syntax ???


In documentation

1 Like

Hi @Erick,

The XML import/export isn’t very refined around password import/exports. I’ve filed this for improvement at Refine password element for user import (and possibly export) · Issue #3462 · pkp/pkp-lib · GitHub.

Meanwhile, you should be able to generate usable password data as follows:

sha1('username' . 'password')

i.e., calculate a SHA1 hash of the user’s username and password concatenated together. (This is assuming the encryption setting in uses sha1, which is the normal setting.)

Alec Smecher
Public Knowledge Project Team

Hi Alec
You mean like this for example?

			<password is_disabled="false" must_change="true"
				encryption="sha1('username' . 'password')">
			<user_group_ref>Internal Reviewer</user_group_ref>
			<user_group_ref>External Reviewer</user_group_ref>

That doesn’t work in V 3.1.1. Though it says that the “import was successfull” the new user can’t be found under Users/Roles in the backend. Login isn’t possible, no email was sent.

I should import large user data from a remote system (not ojs) regarding a journal relaunch.

1 Like