AdminResetPassword command

Resets passwords in the database. This command can be used by Administrators, to reset the password of a registered user (for example, if the registered user has forgotten his or her current password). The new password is then randomly generated by the system and e-mailed to the registered user.

Use this command with SSL (Secure Sockets Layer) to ensure that the customer's logon password and personal information are encrypted. To do so type the command with the HTTPS secure protocol.

Command structure

http://host_name/path/
The fully qualified name of your WebSphere Commerce Server and the configuration path

Diagram of the command structure: the command starts with the fully qualified name of your WebSphere Commerce Server and the configuration path, followed by the command name, AdminResetPassword  and the ? character. End the command with a list of parameters in the form of name value pairs. Separate each name value pair with the & character. For a detailed description of the parameters and their values, refer to 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
URL
The URL to be called when the command completes successfully
storeId       
The reference number of a store
logonId
The logon ID of the registered user whose password is to be reset
administratorPassword
The password of the currently logged in administrator. This is required as an extra security measure.

Example

This example resets the password of the registered user who has a logon ID of aa.  The system generates a password and e-mails it to the e-mail address associated with the logon ID aa:

    https://myhostname/webapp/wcs/stores/servlet/AdminResetPassword?URL=basemall.jsp
    &logonId=aa &administratorPassword=abc123def

Behavior

Exception conditions

If a required parameter is missing or incorrect, the command sets an exception as follows:

  1. Missing URL parameter. Exception Task Name: ResetPasswordAdministratorErrorView Error code: ECSecurityConstants.ERR_MISSING_REDIRECTURL  
  2. The logonId is missing. Exception Task Name: ResetPasswordAdministratorErrorView Error code: ECSecurityConstants.ERR_MISSING_LOGONID  
  3. The user type is invalid. Exception Task Name: ResetPasswordAdministratorErrorView Error code: ECSecurityConstants.ERR_INVALID_USERTYPE  
  4. The administrator's password is missing. Exception Task Name: ResetPasswordAdministratorErrorView Error code: ECSecurityConstants.ERR_MISSING_ADMINPASSWORD

The error handler is ECConstants.EC_ERROR_CODE.