Running Drupal 7.43 and civicrm 4.7.12.
We sell memberships to individuals and organisations.
The creation of an Individual works fine. The contact is created and the Drupal account created.
When signing up as an organisation with a name/address/email/create drupal profile, I get the error:
DB Error: already exists.
And the fatal error in Drupal logs:
$Fatal Error Details = Array ( [callback] => Array ( [0] =>
CRM_Core_Error [1] => handle ) [code] => -5 [message] => DB Error:
already exists [mode] => 16 [debug_info] =>
INSERT INTO civicrm_uf_match (domain_id, uf_id , uf_name , contact_id)
VALUES ( 1 , 1229 , '[email protected]' , 2603 )
[nativecode=1062 ** Duplicate entry '[email protected]' for key
'UI_uf_name_domain_id'] [type] => DB_Error [user_info] => INSERT INTO
civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,
1229 , '[email protected]' , 2603 ) [nativecode=1062 ** Duplicate entry
'[email protected]' for key 'UI_uf_name_domain_id'] [to_string] =>
db_error:
message="DB Error: already exists" code=-5 mode=callback
callback=CRM_Core_Error::handle prefix="" info="INSERT INTO
civicrm_uf_match (domain_id , uf_id , uf_name , contact_id ) VALUES ( 1 ,
1229 , '[email protected]' , 2603 ) [nativecode=1062 ** Duplicate entry
'[email protected]' for key 'UI_uf_name_domain_id']"] )
Weird thing is that it seems to work fine.
- Organisation is created and given membership.
- Individual is created with relationship to organisation
- Drupal account is created for Individual
But they are just given the error and not logged in.
I can get them to manually create an account after creating membership and link it to their civicrm contact, but it seems like an unneeded extra step for users.
Maybe I need to use civicrm_entity and trigger a rule? Thanks