Set User's entry field from PHP in Craft 3
By checking vendor/craftcms/cms/src/controllers/UsersController.php and vendor/craftcms/cms/src/base/Element.php, I did it like 

$user-&gt;setFieldValue('products', $userProductsIds);
return Craft::$app-&gt;getElements()-&gt;saveElement($user, false);