Sample: Loading registered users
This sample shows you how to insert registered users into the database.
About this sample
This sample loads the following registered users into the database:- Jacob Smith
- Ryan Johnson
- Olivia Lee
When you load the data in this sample, the Data Load utility does not load any user
passwords. By default for security reasons, the Data Load utility does not load user password
information from CSV files into the HCL Commerce database. When you try to load a user
password with the utility, the value for the password in the database is instead set to NULL. When
the user tries to log on, the password for the user is automatically reset regardless of the
password the user entered. An email is then sent to the user with a temporary password that the user
can use to log on and set their user password. You can disable the automatic reset when the password
is null at logon by disabling the following configurable property in the instance configuration
file:
MemberSubSystem/ResetPassword/resetNullPasswordEnabled
This property
exists in the following file: - WC_installdir/ts.ear/xml/config/wc-server.xml
- workspace_dir\WC\xml\config\wc-server.xml
If you disable this property, a user must enter their challenge answer to reset the null password. Then, the user is issued a temporary password to log on and set their new user password.
Procedure
- On a command line, go to the WCDE_installdir\bin directory.
- Open a command line in the . Change the directory to utilities_root/bin directory. For information about entering and leaving containers, see Running utilities from the Utility server Docker container.
- Enter the following command:
- ./dataload.sh ../samples/DataLoad/Member/Person/wc-dataload.xml –DLoadOrder=Person
- dataload ..\samples\DataLoad\Member\Person\wc-dataload.xml –DLoadOrder=Person
If you prefer to work with data in XML format instead of in CSV format, you can configure the utility to use XML formatted files. Edit the wc-dataload.XML file and change the location elements to reference the XML files provided.
Verifying results
To verify that the registered users were loaded into the database, run the following SQL command:select DN from users where registertype='R'