Enabling the account activation by email function in the Aurora starter store

You can enable account activation so that customers must click an activation URL before they become registered in the Aurora starter store.

The following list summarizes the registration process with account activation enabled.
  1. The customer browses to the Registration page.
  2. The customer completes the required registration fields and submits the form.
  3. The customer account is placed in a pending e-mail activation state (MEMBER.STATE=3) in WebSphere Commerce and the user is logged off.
  4. WebSphere Commerce sends an email that contains an activation URL to the customer.
  5. The customer clicks the activation URL to activate their account.
  6. The customer account becomes active in WebSphere Commerce.
  7. The customer must log on to run as the registered customer.

Before you begin

  • Publish the Aurora starter store

Procedure

  1. Accessing the development database directly
  2. Enable user account activation by email.

    Run the following SQL statement to register the account activation command. Ensure to replace storeId with your storeId, for example, 10001.

    insert into cmdreg (storeent_id, interfacename, classname, target) 
    values (storeId, 'com.ibm.commerce.member.facade.server.commands.UserRegistrationAddCheckApprovalCmd', 
    'com.ibm.commerce.member.facade.server.commands.UserRegistrationAddCheckApprovalEmailActivationCmdImpl', 'Local'); 
    
    insert into cmdreg (storeent_id, interfacename, classname, target) 
    values (storeId,'com.ibm.commerce.usermanagement.commands.UserRegistrationAddCmd', 
    'com.ibm.commerce.member.facade.server.commands.UserRegistrationAddWithApprovalCheckCmdImpl','Local');
    insert into cmdreg (storeent_id, interfacename, classname, PROPERTIES, target)
    values (storeId, 'com.ibm.commerce.member.facade.server.commands.UserRegistrationEmailActivateCmd',
    'com.ibm.commerce.member.facade.server.commands.UserRegistrationEmailActivateCmdImpl', 'view=LogonForm','Local');
  3. Configure outbound email notification messages using the "User account activation by email message type". Ensure that the message is in text/html format so that the URL is displayed correctly.
  4. Enable the Account activation via Email option in the Store Management tool.
    1. Open the Management Center.
    2. Open Management Center Tools menu and select Store Management.
    3. Click Stores.
    4. Double-click the store that you want to enable account activation.
    5. Click the Registration tab and click the Account Activation via E-mail check box.
      Ensure that there is a check mark in the check box.
      Account activation by email enabled.
    6. Click Save.
  5. Restart your server.

What to do next

You can verify the account activation in the Aurora starter store by browsing to the Registration page and submitting the form. Check your email for the account activation URL to complete the registration.