IUserService.ActivateUser
Reference
void ActivateUser(Guid userId)
Use the ActivateUser method to activate a user by their user id or user profile type instance id.
Parameters
userId: The unique Guid for a Protrak user or Protrak user profile type instance. This id can be used to fetch the details of protrak user or user profile type instance.
Returns
This method does not return a value.
Caveats
- This API activates the specified Protrak user account.
- It creates an asynchronous job to manage instance access to the given protrak user account.
- This API can only be used by:
- Admin account type users
- Users with roles that have
ActivatedDeactivateUserpermission.
Usage
- Activating by
User Id
UserService.ActivateUser(userId);
- Activating by
User Profile Type Instance Id
UserService.ActivateUser(userProfileTypeInstanceId);
Troubleshooting
- If the context user account type is non-admin and user's roles do not include the
ActivateDeactivateUserpermissions, a Prorigo.Core.Exceptions.UnauthorizedException is thrown. Based on the business logic, developer may need to catch this exception to handle the scenario appropriately.