RT# 39340 - configured the minimal selfservice to get mac address from radius account...
[freeside.git] / min_selfservice / login.php
index 91e19cd..b4e2b26 100644 (file)
@@ -4,16 +4,14 @@ require('freeside.class.php');
 $freeside = new FreesideSelfService();
 
 $ip = $_SERVER['REMOTE_ADDR'];
-# need a routine here to get mac address from radius account table based on ip address.  Every else should be good to go.
-$mac_addr = '1234567890FF';
+
+$mac_addr = $freeside->get_mac_address( array('ip' => $ip, ) );
 
 $response = $freeside->login( array( 
-  'username' => $mac_addr
+  'username' => $mac_addr['mac_address'],
   'domain'   => 'ip_mac',
 ) );
 
-#error_log("[login] received response from freeside: $response");
-
 $error = $response['error'];
 
 if ( $error ) {