Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 2.1.4
-
Fix Version/s: 2.2.0
-
Component/s: CiviCRM Profile
-
Labels:None
Description
See http://forum.civicrm.org/index.php/topic,5915.0.html
Civi 2.1.4, Drupal 6.9, MySQL 5.0.45, PHP 5.2.8
Contribution page set up as follows:
Allow individuals to contribute and / or signup for membership on behalf of an organization? - yes
–
Execute real-time monetary transactions: yes
Payment Processor: none
Contribution Amounts section enabled: no
Pay later option: yes
–
Membership Section Enabled? - yes
(One membership type selected)
Require Membership Signup: yes
Separate Membership Payment: no
Display Membership Fee: yes
–
Profile: one profile enabled, with First / Last Name, both required; account registration option ticked.
Make contribution:
I am contributing on behalf of an organization: yes
Create an account? - yes
Result: Individual and Organization correctly created, membership correctly attached to Org, Drupal user created but civicrm_uf_match record has the Org's contact_id instead of the Individual's, contrary to the banishment of the org as user hack.
This query will show the incorrect entries:
mysql> SELECT u.*, c.display_name, c.contact_type FROM civicrm_uf_match u INNER JOIN civicrm_contact c ON u.contact_id = c.id WHERE c.contact_type != 'Individual';
I tried to replicate on drupal.demo.civicrm.org (on 2.2 beta rev 19961, around 13:45 GMT 19 Feb 2009):
contrib page: Test On Behalf http://drupal.demo.civicrm.org/civicrm/contribute/transact?reset=1&id=4
Can't tell what happened as I don't have access to the db but if the above query finds a record with 'davej' in the email address, then I've replicated the problem.