X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fcp.pm;h=2ae97e12d99e515f3a2f7a0f378dd66824d281b0;hb=ffa18709ee8a4d05e18d2d406cf73afe79e52524;hp=ee5f54285757263a3a75ad4504108135d3042e2d;hpb=fc970220d488dfbcf2f7a4b1c7ae6b7618af1ecc;p=freeside.git diff --git a/FS/FS/part_export/cp.pm b/FS/FS/part_export/cp.pm index ee5f54285..2ae97e12d 100644 --- a/FS/FS/part_export/cp.pm +++ b/FS/FS/part_export/cp.pm @@ -1,10 +1,33 @@ package FS::part_export::cp; -use vars qw(@ISA); +use vars qw(@ISA %info); +use Tie::IxHash; use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'port' => { label=>'Port number' }, + 'username' => { label=>'Username' }, + 'password' => { label=>'Password' }, + 'domain' => { label=>'Domain' }, + 'workgroup' => { label=>'Default Workgroup' }, +; + +%info = ( + 'svc' => 'svc_acct', + 'desc' => 'Real-time export to Critical Path Account Provisioning Protocol', + 'options'=> \%options, + 'default_svc_class' => 'Email', + 'notes' => <<'END' +Real-time export to +Critial Path Account Provisioning Protocol. +Requires installation of +Net::APP +from CPAN. +END +); + sub rebless { shift; } sub _export_insert { @@ -21,8 +44,9 @@ sub _export_replace { my( $self, $new, $old ) = (shift, shift, shift); return "can't change domain with Critical Path" if $old->domain ne $new->domain; - return '' unless $old->username ne $new->username - || $old->_password ne $new->_password; + return "can't change username with Critical Path" #CP no longer supports this + if $old->username ne $new->username; + return '' unless $old->_password ne $new->_password; $self->cp_queue( $new->svcnum, 'replace', $new->domain, $old->username, $new->username, $old->_password, $new->_password ); } @@ -91,20 +115,22 @@ sub cp_command { #subroutine, not method ); } - my $other = 'F'; + #my $other = 'F'; if ( $new_password =~ /^\*SUSPENDED\* (.*)$/ ) { $new_password = $1; - $other = 'T'; + # $other = 'T'; } - cp_command($host, $port, $username, $password, 'set_mailbox_status', - Domain => $domain, - Mailbox => $new_username, - Other => $other, - Other_Bounce => $other, - ); + #cp_command($host, $port, $username, $password, $login_domain, + # 'set_mailbox_status', + # Domain => $domain, + # Mailbox => $new_username, + # Other => $other, + # Other_Bounce => $other, + #); if ( $old_password ne $new_password ) { - cp_command($host, $port, $username, $password, 'change_mailbox', + cp_command($host, $port, $username, $password, $login_domain, + 'change_mailbox', Domain => $domain, Mailbox => $new_username, Password => $new_password, @@ -132,3 +158,5 @@ sub cp_command { #subroutine, not method } +1; +