code: public void setForcedUser(int contextId, int userId) throws IllegalStateException {
  		User user = getUserManagementExtension().getContextUserAuthManager(contextId).getUserById(userId);
  		if (user == null)
  			throw new IllegalStateException("No user matching the provided id was found.");
  		setForcedUser(contextId, user);
  	}
docs: Sets the forced user for a context, based on the user id.
  
  @param contextId the context id
  @param userId the user id
  @throws IllegalStateException if no user was found that matches the provided id.