$parent = parent::actionRegister(); $dataId = MyAddOn_Helper_MyAddOnHelper::getDataId(); $writer = $writer = XenForo_DataWriter::create('XenForo_DataWriter_User'); $writer->set('myaddon_data', $dataId); $writer->save(); return $parent;
One of two things happens...
If $writer->save is in the code then I get some errors - understandable as presumably I'm trying to write a row to the xf_user table that doesn't have some crucial fields set yet, such as user_id and other required fields.
If I remove $writer->save I get no errors, but the data isn't saved at all.
I'm sure I'm missing something that will solve this
Help is much appreciated