Add paragraphs item to user entity
First make sure following things are configured properly:


Is Entity API module is enabled in your site?
Have you enabled Logging and errors from admin/config/development/logging page, to see site errors?
In second line you have not defined $user object, are you defined else where?
How are you calling this function?


If everything is configured properly then execute following code:

$name = "Test";
global $user;
$userdata = user_load($user-&gt;uid);
$paragraph = entity_create('paragraphs_item', array('field_name' =&gt; 'field_userdata'));
$paragraph-&gt;setHostEntity('user', $userdata);
$paragraph-&gt;field_name[$userdata-&gt;language][]['value'] = $name;
$entity-&gt;save();