Unable to use password generating feature on XML Import of OJS users

I am trying to sort out how to import users into OJS 3.3.0.11
What i want to do is to import users and let OJS generate a password and notify the new users by email.

Documentation here: https://docs.pkp.sfu.ca/admin-guide/en/data-import-and-export#users indicates that there is a password generating feature.

  • If you allow the system to generate passwords for the users you are uploading, you can optionally allow the system to email the users with their account credentials. This option can be found on the Users XML Plugin Page (“Send a notification email to each imported user containing the user’s username and password.”).

When i import a user without a password tag in the XML, OJS gives this error:

An empty password gives an error too:

Here is a user from my XML file:

<users>
	<user>
		<givenname>Bob</givenname>
		<familyname>Funky</familyname>
		<affiliation>My Affiliation</affiliation>
		<country>CA</country>
		<email>bfunky@test.test</email>
		<username>bfunky</username>
		<user_group_ref>Journal editor</user_group_ref>
		<review_interests>IT</review_interests>
	</user>
</users>

Hi @Linn9000

Have you checked the XML sample and the password parameters to include when using the format to add users?

Please, see it here:
ojs/sample.xml at main · pkp/ojs · GitHub

Best,
Israel

Hi @israel.cefrin
Thanks for the help.
I am able to import users based on the sample.xml file. This works well so far.

I am still wondering about this part of the documentation : https://docs.pkp.sfu.ca/admin-guide/en/data-import-and-export#create-a-users-xml-file-for-import

It specifically says OJS can email users with a generated password :

  • If you allow the system to generate passwords for the users you are uploading, you can optionally allow the system to email the users with their account credentials. This option can be found on the Users XML Plugin Page (“Send a notification email to each imported user containing the user’s username and password.”).

Does this mean there is a way for OJS to generate a password ?
Does this mean there is a way for OJS to send an email to newly created users ?

Thanks!

Hi @Linn9000

To force OJS to generate and send the password, you need to leave this tag out from your XML. You can confirm this info from this thread:

Best,
Israel

Finally got this to work!
I had to use exactly this for the password tag:

<user>
	<givenname>Bob</givenname>
	<familyname>Funk</familyname>
	<affiliation>University of Test</affiliation>
	<country>CA</country>
	<email>bob.funky@test.test</email>
	<username>bfunky</username>
        <password encryption="plaintext" is_disabled="false" must_change="true">
            <value></value>
        </password>
	<user_group_ref>Author</user_group_ref>
	<review_interests>TI, Transmission</review_interests>
</user>

After the import, i got this from OJS:

Thanks to all who helped.

I think this will save us a lot of time