Signup status not updating for anon users
ptone - May 7, 2008 - 06:50
| Project: | Signup Status |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
in the form submit, the value for the anonymous email is using the db field name "anon_mail" instead of the form element "signup_anon_mail".
Sorry, I'm too lazy to roll the patch right now because I have some other custom changes in the module, but I checked and the bug exists in both the 1.0 and the current 1.x-dev
The way it is now:
function signup_status_alter_signup_form_submit($form_id, $form_values) {
signup_status_update_signup_status($form_values['uid'], $form_values['nid'], NULL, $form_values['signup_status'], $form_values['anon_mail']);
}The way it should be:
function signup_status_alter_signup_form_submit($form_id, $form_values) {
signup_status_update_signup_status($form_values['uid'], $form_values['nid'], NULL, $form_values['signup_status'], $form_values['signup_anon_mail']);
}
#1
#2
This issue seems to be fixed. I was able to change the status of anonymous users just the same as registered users.
I look a look at the code in question and it is much different now (Dev 2009-May-11) than was reported. Looking at the code (below), you can see that it is properly referencing values['signup_anon_mail'].
<?phpfunction signup_status_alter_signup_form_submit($form, &$form_state) {
$values = $form_state['values'];
if (isset($values['signup_status'])) {
$sql = "SELECT * FROM {signup_log} WHERE uid = %d AND nid = %d";
$args = array($values['uid'], $values['nid']);
if (isset($values['signup_anon_mail'])) {
$sql .= " AND anon_mail = '%s'";
$args[] = $values['signup_anon_mail'];
}
if ($signup = db_fetch_object(db_query($sql, $args))) {
$signup->status = $values['signup_status'];
db_query("UPDATE {signup_log} SET status = %d WHERE sid = %d", $signup->status, $signup->sid);
_signup_status_change('add', $signup);
}
}
}
?>
#3
#4
Sorry, shouldn't have changed the title. There is no "default" -- this is for when the status field appears on the signup form.
#5
So this is actually fixed, not RTBC. Great. ;)
If someone actually cares about signup_status D5, they can backport this and reopen this with a patch. Otherwise, this is done.
#6
Automatically closed -- issue fixed for 2 weeks with no activity.