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 WebSphere 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 is enabled by default when the foundation feature is enabled. 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

  1. Open the command-line interface and go to the following directory:
    • WC_installdir/bin
    • WebSphere Commerce DeveloperWCDE_installdir\bin
  2. Enter the following command:
    • AIXLinux./dataload.sh ../samples/DataLoad/Member/Person/wc-dataload.xml –DLoadOrder=Person
    • WebSphere Commerce DeveloperWindowsdataload ..\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'

Cleaning up the data

To remove the data that is loaded in this sample from the database, run the CleanUp.sql file that is in the /samples/DataLoad/Member/Person directory.