Adriano Faria's post in Adding a field to registration was marked as the answer
Quick example, obviously not tested:
/**
* Build Registration Form
*
* @return \IPS\Helpers\Form
*/
public static function buildRegistrationForm( $postBeforeRegister = NULL )
{
$form = parent::buildRegistrationForm( $postBeforeRegister );
$form->add( new \IPS\Helpers\Form\Text( 'field_name', NULL, TRUE ), 'password_confirm' );
return $form;
}
/**
* Create Member
*
* @param array $values Values from form
* @param array $profileFields Profile field values from registration
* @param array|NULL $postBeforeRegister The row from core_post_before_registering if applicable
* @return \IPS\Member
*/
public static function _createMember( $values, $profileFields, $postBeforeRegister = NULL )
{
$member = parent::_createMember( $values, $profileFields, $postBeforeRegister );
$member->field_name = $values['field_name'];
$member->save();
return $member;
}