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.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 839640-b.patch | 7.71 KB | ezra-g |
| #2 | 839640-a.patch | 7.68 KB | ezra-g |
| #1 | 839640.patch | 7.44 KB | ezra-g |
Comments
Comment #1
ezra-g commentedThis 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.
Comment #2
ezra-g commentedHere's a revised version that provides more information about how many signups were updated to the new format.
Comment #3
ezra-g commentedI 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.