summaryrefslogtreecommitdiff
path: root/FS/FS/ClientAPI
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-01-16 12:14:54 -0500
committerChristopher Burger <burgerc@freeside.biz>2018-09-11 11:40:59 -0400
commit76a893c2187f59e7fdb9bc8282b780efd9dd8504 (patch)
treebbdbab4dc1df7ff44fa607162a00f38ab74a1b4e /FS/FS/ClientAPI
parente55e22e00eba74f2713b52fccbbb380f454531f4 (diff)
RT# 39340 - Created minimal selfservice that only allows payments to be made, authorization is based on ip and mac address. This is not done yet need to write routine to get mac address from radius server based on ip address.
Diffstat (limited to 'FS/FS/ClientAPI')
-rw-r--r--FS/FS/ClientAPI/MyAccount.pm7
1 files changed, 7 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index dbecb9b..a30dde5 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -237,6 +237,13 @@ sub login {
$svc_x = $svc_phone;
+ } elsif ( $p->{'domain'} eq 'ip_mac' ) {
+
+ my $svc_broadband = qsearchs( 'svc_broadband', { 'mac_addr' => $p->{'username'} } );
+ return { error => 'IP address not found' }
+ unless $svc_broadband;
+ $svc_x = $svc_broadband;
+
} elsif ( $p->{email}
&& (my $contact = FS::contact->by_selfservice_email($p->{email}))
)