Reference > Shop flow URLs > Member subsystem URLs > Registration
UserRegistrationUpdate URL
This URL updates the registration record for a registered user.
This URL updates the registration record for a registered user.
To run this URL, the user must first log onto the WebSphere Commerce system as registered user. If the current user is a guest customer, this command will call the UserRegistrationAdd command to register a new user. Information for users is stored in the MEMBER, USERS, USERREG, ADDRESS, ADDRBOOK, MBRREL, USERPROF, BUSPROF, USERDEMO, and ADDRESS database tables.
Use this URL with SSL (Secure Sockets Layer) to ensure that the user's information is encrypted.
To do so type the command with the HTTPS secure protocol.
URL structure
- http:// host_name/path/
- The fully qualified name of the WebSphere Commerce Server and the configuration path.
name-value pair with the & character. For a detailed description of the parameters and their values, see the list entitled Parameter values." />
Parameter values
- langId
- Sets or resets the preferred language for the duration of the session; the supported languages for a store are found in the STORELANG table.
- forUser
- The logon ID of the user or organization on whose behalf the command will be run; only a person with the authority to process orders can specify this parameter.
- forUserId
- Same as forUser, but identifying the user by the internal user ID, as found in the USERS table.
- URL
- Required: The URL to be called when the command completes successfully.
- logonId
- The registrant's logon ID.
If you are using LDAP, changing a user's logonID is not supported because it would require deleting and recreating the user in LDAP. This process would cause all non-WebSphere Commerce user attributes, such as the password, to be lost.
If you are not using LDAP, changing the user's logon ID is not recommended, because the promotion subsystem stores the logon ID of the creator of the promotion in the XMLPARAM column of the PX_PROMOTION table.
When the UserRegistrationUpdate command is used to change the logonID, the command will automatically update the USERS.DN database column. Do not assume that ADDRESS.NICKNAME will also change. Instead, the following finder should be used to get the single self address of a user: AddressAccessBean.findSelfAddressByMember(Long memberID).
- logonPassword
- The registrant's password. In database mode, the password is encrypted before it is saved in the database. In LDAP mode, the password is only stored on the LDAP server.
- logonPasswordVerify
- Required if the logonPassword is used: The registrant's password, entered a second time.
- preferredCurrency
- The registrant's preferred currency for transactions; a foreign key that references the SETCCURR column of the SETCURR table.
- preferredLanguage
- The registrant's preferred language; a foreign key that references the LANGUAGE_ID column of the LANGUAGE table.
- userField1, userField2, userField3
- Customizable fields.
- challengeQuestion
- Challenge question for verbal confirmation of the customer's identity.
- challengeAnswer
- Answer to the challenge question.
- description
- A description of the registrant.
- userProfileField1, userProfileField2
- Customizable fields.
- photo
- URL or path to a photo of the registrant.
- preferredCommunication
- The preferred phone for the registrant (stored in the ADDRESS table), for example: P1=phone 1 P2=phone 2
- preferredDelivery
- The registrant's preferred mode of delivery.
- preferredMeasure
- The registrant's preferred unit of measure.
- taxPayerId
- A string used to identify the user for taxation, especially useful with tax software.
- alternateId
- A special ID assigned by the registrant's business organization or organizational unit to this particular registrant.
- departmentNumber
- The department identifier for the registrant.
- employeeId
- The registrant's ID with his or her employer.
- employeeType
- The registrant's status as an employee (for example, regular, permanent, contractor, or part time).
- manager
- The name of the registrant's manager.
- organizationId
- The identifier of the registrant's company; foreign key to the ORGENTITY table.
- organizationUnitId
- The identifier of the registrant's organizational unit; foreign key to the ORGENTITY table.
- secretary
- The name of the registrant's secretary.
- age
- The registrant's age.
- children
- The number of children the registrant has.
- companyName
- The company name of the organization that the registrant represents, obtained when filling in demographic information .
- demographicField1, demographicField2, demographicField3, demographicField4
- Customizable fields for demographic information; these are single-character fields.
- demographicField5
- Customizable field for demographic information; a field of 254 characters.
- demographicField6
- Customizable field for demographic information; an integer field.
- demographicField7
- Customizable field for demographic information; a field varchar, length 64.
- gender
- The registrant's gender.
- hobbies
- The registrant's hobbies.
- household
- The number of people in the registrant's household; the default is 1.
- income
- The registrant's annual income.
- incomeCurrency
- The currency in which the registrant's income is paid.
- maritalStatus
- The registrant's marital status.
- orderBefore
- Whether the registrant has previously placed an order. This value is supplied by the registrant.
- timeZone
- The time zone in which the registrant does business (report as GMT +/- hours) .
- address1, address2, address3
- The registrant's street address, to a maximum of three lines of information.
- addressField1, addressField2, addressField3
- Customizable fields.
- addressType
- The purpose of the address. Valid values are:
- S
- shipto
- B
- billto
- SB
- shipto and billto (The default value.)
- bestCallingTime
- D
- An indicator that daytime is the best time to call the registrant.
- E
- An indicator that evening is the best time to call the registrant.
- billingCode
- The registrant's organization's code to identify the shipping or billing addresses and cost center.
- billingCodeType
- Code designating the method of code structure used for the billing code. The default value is D, assigned by buyer.
- city
- The name of the city where the registrant resides.
- country
- The name of the country or region where the registrant resides.
- email1
- The registrant's primary e-mail or Web address.
- email2
- The registrant's secondary e-mail or Web address.
By default, it is not used for notifications to the member.
- receiveEmail
- Determines whether the registrant wants to receive e-mail activities for the current store (or all stores if no stores have been visited during the session):
- true
- The user wants to receive e-mail activities.
- false
- The user does not want to receive e-mail activities (the default).
- fax1
- The registrant's primary facsimile number.
- fax2
- The registrant's secondary facsimile number.
- firstName
- The first name of the registrant.
- lastName
- Required if the authentication mode is LDAP: The last name of the registrant. If the authentication mode is LDAP, this parameter is mandatory.
- middleName
- The middle name of the registrant.
- officeAddress
- The internal address (for example, mail stop).
- organizationName
- The name of the organization that the registrant represents.
- organizationUnitName
- The name of the unit within the organization that the registrant represents.
- packageSuppression
There is no default for this field. If the field is left unused, it remains null in the database.
- 1
- An indicator to include package inserts when the order is shipped.
- 0
- An indicator to not include package inserts when the order is shipped
- personTitle
- The title of the user whose address is being entered (for example, Dr., Rev., Mr. or Ms.).
- phone1
- The registrant's primary phone number.
- phone1Type
- The type of phone used for the registrant's primary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters.
- phone2
- The registrant's secondary phone number.
- phone2Type
- The type of phone used for the registrant's secondary phone number, for example TTY for hearing impaired, PCM for pulse-coded modulation, or CEL for mobile. This is a field of 3 characters.
- publishPhone1
There is no default for these publishPhone fields. If the field is left unused, it remains null in the database.
- 1
- An indicator that the registrant's primary phone number is listed.
- 0
- An indicator that the registrant's primary phone number is unlisted
- publishPhone2
- 1
- An indicator that the registrant's secondary phone number is listed.
- 0
- An indicator that the registrant's secondary phone number is unlisted
- shippingGeoCode
- A shipping code based on geographical region, especially useful with tax software.
- state
- The name of the state, province, or equivalent where the registrant resides.
- taxGeoCode
- A tax code based on geographical region, especially useful with tax software.
- zipCode
- The ZIP or postal code of the registrant's address.
- Custom member attributes
- You can manage custom member attributes (MBRATTRVAL table) for this user using the following syntax: &attributeName_storeId_action_number=value
Where:
- attributeName
- The name of the custom attribute that has already been defined in the NAME column of the MBRATTR table.
- storeId
- The store ID of the store for which the attributeName applies. Specify "null" if the attribute is not store specific.
- action
- Specifies the action to perform with the value:
- a
- add value
- r
- replace value
- d
- delete value
- number
- In the case of multi-valued attributeNames, specify this parameter to assign multiple entries with the same attributeName, storeId, or action.
- value
- The value that to assign to the attribute.
The following are examples of syntax for customer attributes or parameters:
- Updates the database with the value of red for a defined customer attribute for the user's favorite color within store 10001:
&favoritecolor_10001_r_1=red
- Updates two attributes: In store 10001, the user's favorite color is red, and in store 10002, the user's favorite color is blue:
&favoritecolor_10001_r_1=red&favoritecolor_10002_r_1=blue
- Deletes an attribute from store 10001:
&favoritecolor_10001_d_1=red
Example 1
The following example updates a registered user to change their logon password.
https://myhostname/webapp/wcs/stores/servlet/UserRegistrationUpdate?logonPassword=pass &logonPasswordVerify=pass&URL=MallFrontView
Example 2
The following example registers a consumer direct user:
https://myhostname/webapp/wcs/stores/servlet/UserRegistrationUpdate?logonId=user1 &logonPassword=pass&logonPasswordVerify=pass&URL=MallFrontView
Example 3
The following example registers a consumer direct user:
https://myhostname/webapp/wcs/stores/servlet/UserRegistrationUpdate?logonId=user1 &logonPassword=pass&logonPasswordVerify=pass&URL=MallFrontView
Example 4
The following example registers a B2B user under the Default Organization by specifying the encrypted orgEntityId as the value for the parentMember parameter:
https://myhostname/webapp/wcs/stores/servlet/UserRegistrationUpdate?logonId=b2buser2 &logonPassword=pass&logonPasswordVerify=pass&profileType=B&parentMember=fpqG/Uw9Pdw=&URL=MallFrontView
Behavior
- Note that the parent member and the profile type of the user cannot be changed.
- Calls an empty task command called PreUserRegistrationUpdateCmd. Store Developers can overwrite it to change the input to the command.
- Updates the record of the current registered user in the USERS table.
- If the authentication mode is 'LDAP', a user information may also be updated on the LDAP server.
- If the authentication mode is 'LDAP', the logonId cannot be changed.
- If one or more fields related to the USERPROF, BUSPROF or USERDEMO tables are specified, updates each of these tables. If there is no record, creates a new record in these tables.
- If one or more fields related to the ADDRESS table are specified, the self address (also called the registration address, with the selfAddress field set to '1') will also be updated. The old address will be marked as 'T' (temporary) and a new record will be created in the ADDRESS table. If this user does not have self address, a new self address will be created.If the logonPassword has been changed, calls the AuthenticationPolicyCmd task command to verify or update a user's credentials.
- Checks required registration information parameters.
- Calls the AuditUserRegistrationCmd task command to check additional parameters. Store Developers need to add new code to the AuditUserRegistrationCmd task command if they want to customize the check.
- Calls the SetCurrencyPrefCmd task command to set preferred currency to command context.
- When LDAP is used, the user is created in both the database and on the LDAP server. The authentication information is stored only in database, but all other information is replicated back to the database.
- Calls an empty task command called PostUserRegistrationUpdateCmd. Store Developers can overwrite it to perform additional operations.
- If the command fails, the UserRegistrationErrorView view command is called. Upon successful completion, the specified URL is called.
- When the user is created using this command, the system assigns roles based on the MemberRegistrationAttributes.xml file. When choosing the roles to assign, the system uses the following information: the RegistrationType of 'UserRegistration', the member ancestor tree for the user, and the store to which the user is registering.
Exception conditions
- If the URL parameter is null, the system throws an exception with the message key _ERR_CMD_MISSING_PARAM
- If the length of the value of the URL parameter equals 0, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- If the logonId parameter is not null, but the length equals 0, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- In LDAP mode, if the logonId is not null, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- If the length of the value of the logonPassword parameter is not null, and equals 0 or is greater than 70, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- If logonPassword is not null but logonPasswordVerify is null, the system throws an exception with the message key _ERR_CMD_MISSING_PARAM.
- If logonPassword is not null and it is not equal to logonPasswordVerify, the system throws an exception with the message key EC_UREG_ERR_PASSWORDS_NOT_SAME.
- If the preferredCurrency value is not null, and it is not a foreign key set to the SETCCURR table, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- If the preferredLanguage value is not null, and it is not a foreign key set to the LANGUAGE table, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
- If the any of the following parameters: age, income, children, household, demographicField6, publishPhone1, publishPhone2, or packageSupression, are not null and are not integers, the system throws an exception with the message key _ERR_CMD_INVALID_PARAM.
Related concepts
Related tasks
Define custom attributes for member URLs
Related reference
MemberRegistrationAttributes XML and DTD files
Sample: Member subsystem properties files