From f772dc7a1da618a609b3312ce390e7cf11abde8c Mon Sep 17 00:00:00 2001
From: Imran Hussain <imranh@sucs.org>
Date: Thu, 13 Oct 2016 10:29:44 +0100
Subject: [PATCH] Fix old members returning with the same student id while
 still being a student.

---
 components/susignup.php | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/components/susignup.php b/components/susignup.php
index 4d7d4b8..91b5246 100755
--- a/components/susignup.php
+++ b/components/susignup.php
@@ -40,19 +40,13 @@ if (!empty($_REQUEST['sid']) && !empty($_REQUEST['transactionID'])) {
         if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] == paidUntil(time())) {
             // let them know they are already signed up and renewed
             message_flash("You are a numpty and have already signed up and paid for this year.");
-            // else if check to see if they have signedup and paid for the new year but haven't renewed
+        // else if check to see if they have signedup and paid for the new year but haven't renewed
         } else if ($tmpresult->fields["sid"] == $sid && $tmpresult->fields["paid"] != paidUntil(time())) {
             // renew them!
             renew_membership($tmpresult->fields["username"]);
             // let them know that their account has been renewed
             message_flash("Your SUCS account has been renewed.");
-            // else if they aren't in the SUCS DB but have a signup slip, take them back to that part of signup
-            // I don't know how you would end up in a state like this but the old code dealt with it so I will as well
-        } else if ($tmpresult->fields == false && $signuptmpresult->fields["sid"] == $sid) {
-            $mode = "form";
-            $smarty->assign("id", $signuptmpresult->fields["id"]);
-            $smarty->assign("pass", $signuptmpresult->fields["password"]);
-            // else if they aren't in the SUCS DB, then bootstrap signup process
+        // else if they aren't in the SUCS DB, then bootstrap signup process
         } else if ($tmpresult->fields == false && $signuptmpresult->fields == false) {
             $mode = "form";
             $pass = make_password();
-- 
GitLab