Way to disable Drupal user account creation?

Posts: 33
Joined: 02/20/2008

This may sound weird, but is there a way to keep Ubercart from automatically creating a Drupal user account when a new customer buys a product? I'm using CiviCRM on a site, and I added Ubercart with one product because the organization sells a DVD. However, since both modules use the Drupal user database and Drupal users are imported into CiviCRM, users (non-members) who buy a DVD automatically get imported to CiviCRM. Plus, the shipping just involves putting postage on an envelope and mailing it, and there is just one product, so maintaining a user account is not needed for non-members.

Thanks.

Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

In core, this isn't possible. Perhaps this can be abstracted so you can have differing order submit handlers... for the time being, you'll have to modify uc_cart.module in the function uc_cart_complete_sale(), but this is bad practice and I'd advise you to devise an alternate solution if at all possible.

Posts: 33
Joined: 02/20/2008

There's no way I can hook into that function (or process) and modify the flow at all?

Posts: 3744
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Not that function specifically, though you can always try and bypass it using hook_form_alter() and a custom submit handler on the review order form. This is getting into Drupal ninja territory, though. Eye-wink

Posts: 18
Joined: 01/28/2008
Bug Finder

We have contributed a patch to accomplish this. The patch works with beta 7 and MySQL, but does not at the moment support PostgreSQL. You can download the patch here.

Posts: 12
Joined: 05/31/2008

Does this patch still work for the latest RC4 release?