Currently the signup module generously offers other modules the chance to interact with its signup process via a module_invoke_all call. However, it only passes along the $node being signed-up-for, and not the $user being signed up. Since admins can sign others up, it's unsafe for an external module to assume that the global $user is the one joining.

The fix is simple, just change:

    $extra = module_invoke_all('signup_sign_up', $node);

to

    $extra = module_invoke_all('signup_sign_up', $node, $user);

This will allow external modules to not only add data to the signup_log table, but also trigger other meaningful actions that are specific to the user signing up. This also brings the "signup_sign_up" event to par with the "signup_cancel" event, which includes the germane $uid.

Comments

dww’s picture

Category: feature » bug

Duh, whoops. I can't believe I didn't fix this when I worked on #107136: Signup Cancel hook needs a uid parameter.

dww’s picture

Status: Active » Fixed

Committed to HEAD and DRUPAL-5, thanks.
(Bumped by the duplicate #261782: Add signup users information to module_invoke_all signup_sign_up hook).

Anonymous’s picture

Status: Fixed » Closed (fixed)

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