Closed (fixed)
Project:
Signup
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2008 at 04:42 UTC
Updated:
6 Jun 2008 at 10:22 UTC
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
Comment #1
dwwDuh, whoops. I can't believe I didn't fix this when I worked on #107136: Signup Cancel hook needs a uid parameter.
Comment #2
dwwCommitted to HEAD and DRUPAL-5, thanks.
(Bumped by the duplicate #261782: Add signup users information to module_invoke_all signup_sign_up hook).
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.