In order to avoid charging people for signups only to find that space us unavailable because someone else purchased around the time the current user is checking out, we create a signup and note that it's temporary in {uc_signup_log}. Ideally, we delete the placeholder signup if payment doesn't come through but in the meantime Signup.module doesn't distinguish between temporary and paid signups. On sites where users who have signed up get special privileges, that's not ideal.

Let's create a placeholder signup with an anonymous email address and then assign that to the correct user once payment comes through.

CommentFileSizeAuthor
#3 839640-b.patch7.71 KBezra-g
#2 839640-a.patch7.68 KBezra-g
#1 839640.patch7.44 KBezra-g

Comments

ezra-g’s picture

Status: Active » Needs review
StatusFileSize
new7.44 KB

This is the direction I'm heading in with this.

I plan to test on a local install of the DrupalCamp Colorado site and see how this works.

ezra-g’s picture

StatusFileSize
new7.68 KB

Here's a revised version that provides more information about how many signups were updated to the new format.

ezra-g’s picture

Status: Needs review » Fixed
StatusFileSize
new7.71 KB

I committed this slightly tweaked version of the above patch.

I tested on a sanitized database export from DrupalCamp Colorado 2010.

Before the patch

mysql> select sl.sid, sl.uid, anon_mail from signup_log sl INNER JOIN uc_signup_log ucl ON sl.sid = ucl.sid where ucl.type = 0;
+-----+-----+-----------+
| sid | uid | anon_mail |
+-----+-----+-----------+
| 40 | 61 | |
| 77 | 112 | |
| 94 | 141 | |
| 109 | 164 | |
| 220 | 210 | |
| 344 | 479 | |
+-----+-----+-----------+
6 rows in set (0.00 sec)

mysql>

After the patch

mysql> select sl.sid, sl.uid, anon_mail from signup_log sl INNER JOIN uc_signup_log ucl ON sl.sid = ucl.sid where ucl.type = 0;
+-----+-----+--------------------------------+
| sid | uid | anon_mail |
+-----+-----+--------------------------------+
| 40 | 0 | placeholder-104157@example.com |
| 77 | 0 | placeholder-108737@example.com |
| 94 | 0 | placeholder-104995@example.com |
| 109 | 0 | placeholder-104442@example.com |
| 220 | 0 | placeholder-107719@example.com |
| 344 | 0 | placeholder-104678@example.com |
+-----+-----+--------------------------------+
6 rows in set (0.00 sec)

I also checked that new signups are created as expected.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.