I want to create a new paragraph item to a user bundle. This is the code:
$name = "Test";
$userdata = user_load($user->uid);
$paragraph = entity_create('paragraphs_item', array('field_name' => 'field_userdata', 'bundle' => 'userdata'));
$paragraph->setHostEntity('user', $userdata);
$paragraph->field_name[LANGUAGE_NONE][0]['value'] = $name;
$paragraph->save();
But nothing happens, no errors, no new entity.. Are there differences to adding to a node bundle?
Thank you!