// by a "Guest" user, we have to trick the Liferay permissionChecker into thinking that the current
// user is the Administrator user (someone who has the permission to set expando column values).
PermissionChecker permissionCheckerBackup = PermissionThreadLocal.getPermissionChecker();
PermissionThreadLocal.setPermissionChecker(getAdministratorPermissionChecker(companyId));
ExpandoBridge expandoBridge = registrant.getExpandoBridge();
expandoBridge.setAttribute(UserExpando.COMPANY_NAME.getName(), registrant.getCompanyName());
expandoBridge.setAttribute(UserExpando.FAVORITE_COLOR.getName(), registrant.getFavoriteColor());
PermissionThreadLocal.setPermissionChecker(permissionCheckerBackup);
}