Add paragraphs item to user entity I want to create a new paragraph item to a user bundle. This is the code:

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


But nothing happens, no errors, no new entity.. 
Are there differences to adding to a node bundle?

Thank you!
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();