Revert "RT# 39340 - configured the minimal selfservice to get mac address from radius...
authorChristopher Burger <burgerc@freeside.biz>
Tue, 2 Oct 2018 16:48:56 +0000 (12:48 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Tue, 2 Oct 2018 16:48:56 +0000 (12:48 -0400)
This reverts commit 30fabfe8ce8c9a48fa96c6a50d48b32161b1680f.

FS/FS/ClientAPI/MyAccount.pm
FS/FS/ClientAPI_XMLRPC.pm
min_selfservice/index.php
min_selfservice/login.php

index 57d4298..263b311 100644 (file)
@@ -184,29 +184,6 @@ sub skin_info {
 
 }
 
 
 }
 
-sub get_mac_address {
-  my $p = shift;
-
-## access radius exports acct tables to get mac
-  my @part_export = ();
-  @part_export = (
-    qsearch( 'part_export', { 'exporttype' => 'sqlradius' } ),
-    qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } ),
-    qsearch( 'part_export', { 'exporttype' => 'broadband_sqlradius' } ),
-  );
-
-  my @sessions;
-  foreach my $part_export (@part_export) {
-    push @sessions, ( @{ $part_export->usage_sessions( {
-      'ip' => $p->{'ip'},
-    } ) } );
-  }
-
-  my $mac = $sessions[0]->{'callingstationid'};
-
-  return { 'mac_address' => $mac, };
-}
-
 sub login_info {
   my $p = shift;
 
 sub login_info {
   my $p = shift;
 
@@ -262,11 +239,8 @@ sub login {
 
   } elsif ( $p->{'domain'} eq 'ip_mac' ) {
 
 
   } elsif ( $p->{'domain'} eq 'ip_mac' ) {
 
-      my $mac_address = $p->{'username'};
-      $mac_address =~ s/\://g;
-
-      my $svc_broadband = qsearchs( 'svc_broadband', { 'mac_addr' => $mac_address } );
-      return { error => 'MAC address not found '.$p->{'username'} }
+      my $svc_broadband = qsearchs( 'svc_broadband', { 'mac_addr' => $p->{'username'} } );
+      return { error => 'IP address not found' }
         unless $svc_broadband;
       $svc_x = $svc_broadband;
 
         unless $svc_broadband;
       $svc_x = $svc_broadband;
 
index db0537c..dcf34fd 100644 (file)
@@ -227,7 +227,6 @@ sub ss2clientapi {
   'quotation_add_pkg'         => 'MyAccount/quotation/quotation_add_pkg',
   'quotation_remove_pkg'      => 'MyAccount/quotation/quotation_remove_pkg',
   'quotation_order'           => 'MyAccount/quotation/quotation_order',
   'quotation_add_pkg'         => 'MyAccount/quotation/quotation_add_pkg',
   'quotation_remove_pkg'      => 'MyAccount/quotation/quotation_remove_pkg',
   'quotation_order'           => 'MyAccount/quotation/quotation_order',
-  'get_mac_address'           => 'MyAccount/get_mac_address',
 
   'freesideinc_service'       => 'Freeside/freesideinc_service',
   };
 
   'freesideinc_service'       => 'Freeside/freesideinc_service',
   };
index 25ec334..c7e20c5 100644 (file)
@@ -10,7 +10,7 @@
     <TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
       <TR>
         <TD>
     <TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0>
       <TR>
         <TD>
-          Sorry we were unable to locate your account with MAC address <? echo $username; ?>  .
+          Sorry we were unable to locate your account with ip <? echo $username; ?>  .
         </TD>
       </TR>
     </TABLE>
         </TD>
       </TR>
     </TABLE>
index b4e2b26..91e19cd 100644 (file)
@@ -4,14 +4,16 @@ require('freeside.class.php');
 $freeside = new FreesideSelfService();
 
 $ip = $_SERVER['REMOTE_ADDR'];
 $freeside = new FreesideSelfService();
 
 $ip = $_SERVER['REMOTE_ADDR'];
-
-$mac_addr = $freeside->get_mac_address( array('ip' => $ip, ) );
+# 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';
 
 $response = $freeside->login( array( 
 
 $response = $freeside->login( array( 
-  'username' => $mac_addr['mac_address'],
+  'username' => $mac_addr
   'domain'   => 'ip_mac',
 ) );
 
   'domain'   => 'ip_mac',
 ) );
 
+#error_log("[login] received response from freeside: $response");
+
 $error = $response['error'];
 
 if ( $error ) {
 $error = $response['error'];
 
 if ( $error ) {