From 83f21ec5225627b5ba5f1d6ed03e2aef444ab8cc Mon Sep 17 00:00:00 2001
From: Imran Hussain <imranh@sucs.org>
Date: Wed, 6 Feb 2019 14:25:31 +0000
Subject: [PATCH] [1/?] Allow student IDs > 6 digits

---
 lib/validation.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/validation.php b/lib/validation.php
index c39b3fa..0c152c9 100644
--- a/lib/validation.php
+++ b/lib/validation.php
@@ -125,7 +125,7 @@ function validSID($SID, $override)
             return true;
         }
     } else {
-        if (!preg_match("/^[0-9]*$/", $SID) || strlen($SID) != 6) {
+        if (!preg_match("/^[0-9]{6,}$/", $SID)) {
             $error = "Invalid student ID";
             return false;
         } elseif (sidUsed($SID)) {
-- 
GitLab