[SUCS Devel] [Git][sucssite/sucs-site][beta] 2 commits: Fix old student members coming back with the same student id after thier account…

Imran Hussain imranh at sucs.org
Thu Oct 13 10:59:55 BST 2016


Imran Hussain pushed to branch beta at sucssite / sucs-site


Commits:
ebdaebc6 by Imran Hussain at 2016-10-13T11:01:05+01:00
Fix old student members coming back with the same student id after thier account has been deleted and they paid via the su

- - - - -
0d379349 by Imran Hussain at 2016-10-13T11:01:05+01:00
It's not my morning...

- - - - -


1 changed file:

- components/susignup.php


Changes:

=====================================
components/susignup.php
=====================================
--- a/components/susignup.php
+++ b/components/susignup.php
@@ -40,19 +40,18 @@ 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) {
+        // else if they aren't in the SUCS DB but have a signup slip, take them back to that part of signup
+        } else if ($tmpresult->fields == false && $signuptmpresult->fields["sid"] == $sid && $signuptmpresult->fields["activated"] == NULL) {
             $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();



View it on GitLab: https://projects.sucs.org/sucssite/sucs-site/compare/44dc89b9547e3716d5df6dda3b0442f4efb59414...0d3793492c8f40dcd9abdb859aa6f5a258b33d2a
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/devel/attachments/20161013/9959e584/attachment-0001.html>


More information about the Devel mailing list