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
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

jrbeeman - November 19, 2008 - 19:48
Version:5.x-1.x-dev» 6.x-1.x-dev
Assigned to:Anonymous» jrbeeman

#2

capellic - June 26, 2009 - 15:58
Status:needs review» reviewed & tested by the community

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'].

<?php
function 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

capellic - July 2, 2009 - 13:49
Title:Signup status not updating for anon users» Signup default status not updating for anon users

#4

capellic - July 2, 2009 - 17:51
Title:Signup default status not updating for anon users» Signup status not updating for anon users

Sorry, shouldn't have changed the title. There is no "default" -- this is for when the status field appears on the signup form.

#5

dww - August 23, 2009 - 17:16
Assigned to:jrbeeman» Anonymous
Status:reviewed & tested by the community» fixed

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

System Message - September 6, 2009 - 17:20
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.