Enable or Disable a User

Catalyst allows you to disable or enable a user at any time. A disabled user will be signed up to your application but will not be able to access your application.

The SDK snippet below demonstrates enabling and disabling an end-user using the update_user_status(userId, USER_STATUS) method.

The user is referred by their unique User ID. You can find the User IDs of all users by navigating to the Users > User Management section of the Authentication component.

The authentication_service reference used below is already defined in the component instance page.

To Enable a User

    
copy
user_details = authentication_service.update_user_status('6759000000124659', 'enable') # Replace the user id

To Disable a User

    
copy
user_details = authentication_service.update_user_status('6759000000124659', 'disable') # Replace the user id

Last Updated 2023-12-18 16:20:08 +0530 +0530