[SUCS Devel] site r618 - branches/sucs-site/components

imranh at sucs.org imranh at sucs.org
Tue Dec 9 18:00:43 GMT 2014


Author: imranh
Date: 2014-12-09 18:00:35 +0000 (Tue, 09 Dec 2014)
New Revision: 618

Modified:
   branches/sucs-site/components/options.php
Log:
isValidMACAddr() now checks and does stuff instead just true all the time.

Modified: branches/sucs-site/components/options.php
===================================================================
--- branches/sucs-site/components/options.php	2014-12-09 17:59:28 UTC (rev 617)
+++ branches/sucs-site/components/options.php	2014-12-09 18:00:35 UTC (rev 618)
@@ -2,6 +2,7 @@
 
 // e-mail, password validation functions
 require_once("../lib/validation.php");
+require_once("Net/MAC.php");
 include_once("../lib/date.php");
 
 
@@ -98,8 +99,11 @@
 
 // Checks whether the given string mac address is valid
 function isValidMACAddr($mac) {
-	// Put code here if needed
-	return TRUE;
+    if (Net_MAC::check($mac)) {
+        return TRUE;
+    }else{
+        return FALSE;
+    }
 }
 
 // Returns the users GuestNet MAC Address if they have one and false otherwise




More information about the Devel mailing list