Anonymous Customer Drupal Account Optional Patch

Contrib type: 
Other
Status: 
Complete and working
Compatibility: 
Ubercart Beta 7

This patch for Ubercart beta 7 makes the creation of a Drupal user account for an anonymous customer optional.

Ubercart creates a Drupal user account for each customer, even if the site configuration indicates that only the site administrator can create a user account. This rather large patch changes five files in Ubercart to prevent that. If this patch is applied and the site is configured such that only the site administrator can create Drupal accounts, the patched Ubercart will respect this and reference the customer in the Ubercart database tables by the customer's email address rather than using the Drupal user ID. By using the email address as a key to the Ubercart tables, all the same reporting functions are supported as in the unpatched version. Logged in Drupal users are treated exactly the same as they would be without this patch.

If the site is configured to allow others than the site administrator to create Drupal user accounts, the patch will produce no change from default Ubercart behavior.

The patch changes SQL used to reference Ubercart tables to use the email address as an alternative to the Drupal user ID to identify the customer. Unfortunately this patch changes only the MySQL version of the SQL, so the patch will not work with PostgreSQL. If someone would provide the necessary PostgreSQL version the patch could be enhanced.

AttachmentSize
anon_cust_patch.tar.gz5.48 KB