Enable or Disable a User

Catalyst allows you to disable or enable a user at any time. A disabled user will still be listed in the Users section in your project, but will not be able to access your application.

The SDK snippet below demonstrates enabling and disabling an end-user using the updateUserStatus() 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.

To Enable a User

Ensure the following packages are imported:

    
copy
import com.zc.component.ZCUserDetail; import com.zc.component.users.ZCUser;
    
copy
ZCUser user = ZCUser.getInstance(); user.updateUserStatus(USER_ID, USER_STATUS.ENABLE);

To Disable a User

Ensure the following packages are imported:

    
copy
import com.zc.component.ZCUserDetail; import com.zc.component.users.ZCUser;
    
copy
ZCUser user = ZCUser.getInstance(); user.updateUserStatus(USER_ID, USER_STATUS.DISABLE);

Last Updated 2023-09-03 01:06:41 +0530 +0530