Skip to content

SUSignup code can't handle people (student numbers) being in the signup table more than once

So they became a full member a few years back, got their account deleted now is still a student and has paid via the su and wants to signup again.

The code goes with the assumption that sid (student number) is a primary key in that table but in reality it's signupid+sid as the primary key.

So when it does a search for them $signuptmpresult = $sucsDB->Execute("SELECT * FROM signup WHERE sid=?",array($sid)); it returns more than one row of data so bits of code like $signuptmpresult->fields["sid"] == $sid will blow up.

My suggestion would be to write a foreach loop and look for a place where in the feilds activated == NULL and use that.

Of course you have to account for not finding activated == NULL or finding it multiple times etc...

EDIT: all the code you should care about is in components/susignup.php