You are reading the documentation for v7.x and earlier, which is no longer the latest version. Switch to v8.x
updateUserLogin
Updates an existing customer login (email) in SAP Commerce Cloud.
This method exchanges data with the replaceUserLogin endpoint exposed by the SAP OCC API Users Controller.
This method works only in an authenticated user session (i.e. when the vsf-sap-token cookie is present in the request). The provided new login has to be a valid email address. The provided password has to be the current user's password.
Once the method is used, the customer has to sign in again with the new login to obtain a new access token.
Signature
export declare function updateUserLogin(
context: SapccIntegrationContext,
props: UpdateUserLoginProps
): Promise<void>;Parameters
| Name | Required | Type | Description |
|---|---|---|---|
context | Required | SapccIntegrationContext | |
props | Required | UpdateUserLoginProps | Parameter object which can be used with this method. Refer to its type definition to learn about possible properties. |
Returns
This method does not return anything.
Referenced Types
Examples
Updating a customer login.
import { sdk } from '~/sdk';
await sdk.commerce.updateUserLogin({
newLogin: 'newlogin@gmail.com',
password: 'test1234',
});