Over at #325237-2: Allow users (even anonymous) to cancel signup via secure URL, Sid_M raises the point about saving canceled signups into another table. I could use that functionality myself. So, either signup should do this itself, or at least it should provide a hook for other modules to do so.

Maybe it's just a question of changing the order of operations in signup_cancel_signup(). Currently, we delete the record first, then invoke hook_signup_cancel(). Arguably, we should invoke the hook first to give other modules a chance to do whatever they want with the {signup_log} record, and then actually remove it. I'd like more input on this before adding Yet another hook (hook_signup_pre_cancel()?).

Comments

dww’s picture

Title: Save canceled signups into another table or provide hook for modules to do this » Fix invocation of hook_signup_cancel() so that the record in {signup_log} is still there
Version: 6.x-2.x-dev » 6.x-1.x-dev
Assigned: Unassigned » dww
Category: feature » bug

After a brief discussion in IRC, it seems we all (myself, add1sun, and EclipseGc) agree that this is basically a bug in the invocation of hook_signup_cancel(). We should just flip the order of operations in signup_cancel_signup() so that we invoke the hook first, then destroy the data.

stborchert’s picture

Status: Active » Needs review
StatusFileSize
new1001 bytes

Hey.
Should it be that simple?

dww’s picture

Patches for HEAD and DRUPAL-6--1. The 6--1 patch applies with an offset (and works) in DRUPAL-5--2, too.

dww’s picture

Status: Needs review » Fixed

Committed to HEAD, DRUPAL-6--1, and DRUPAL-5--2.

Status: Fixed » Closed (fixed)

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