We have been having this problem on 3.3.6. I backported the createCMSUser function from 3.4 but I think the createcms user part should be moved after the participant creation - so if it fails for any reason the data isn't messed up. Wanna test this?
Index: CRM/Event/Form/Registration.php
===================================================================
--- CRM/Event/Form/Registration.php (revision 33706)
+++ CRM/Event/Form/Registration.php (working copy)
@@ -742,10 +742,7 @@
!CRM_Utils_Array::value( 'is_monetary', $this->_values['event'] ) ) {
$mail = 'email-Primary';
}
- require_once "CRM/Core/BAO/CMSUser.php";
- if ( ! CRM_Core_BAO_CMSUser::create( $this->_params, $mail ) ) {
- CRM_Core_Error::statusBounce( ts('Your profile is not saved and Account is not created.') );
- }
+
}
//get the amount of primary participant
if( CRM_Utils_Array::value('is_primary', $this->_params ) ) {
@@ -792,6 +789,10 @@
$this->set ( 'primaryParticipant', $this->_params );
}
$this->assign('action',$this->_action);
+ require_once "CRM/Core/BAO/CMSUser.php";
+ if ( ! CRM_Core_BAO_CMSUser::create( $this->_params, $mail ) ) {
+ CRM_Core_Error::statusBounce( ts('Your profile is not saved and Account is not created.') );
+ }
}
/**