diff options
| author | ivan <ivan> | 2009-08-04 23:49:33 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2009-08-04 23:49:33 +0000 |
| commit | 136e8a1ac9cd533671844381a1754acbbd6a170b (patch) | |
| tree | 62f496b8254639927c3d06da206d1f73327a5bcc /FS/FS | |
| parent | 17956ae071c2a6fca1d677a81be7995248fcaef4 (diff) | |
hopefully ignore errors about deleted accounts and properly finish freeside-sqlradius-reset, RT#5868
Diffstat (limited to 'FS/FS')
| -rw-r--r-- | FS/FS/svc_acct.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/FS/FS/svc_acct.pm b/FS/FS/svc_acct.pm index 37eaf4a15..8376d7bd0 100644 --- a/FS/FS/svc_acct.pm +++ b/FS/FS/svc_acct.pm @@ -1448,11 +1448,15 @@ sub radius_check { my $pw_attrib = length($password) <= 12 ? $radius_password : 'Crypt-Password'; $check{$pw_attrib} = $password; my $cust_svc = $self->cust_svc; - die "FATAL: no cust_svc record for svc_acct.svcnum ". $self->svcnum. "\n" - unless $cust_svc; - my $cust_pkg = $cust_svc->cust_pkg; - if ( $cust_pkg && $cust_pkg->part_pkg->is_prepaid && $cust_pkg->bill ) { - $check{'Expiration'} = time2str('%B %e %Y %T', $cust_pkg->bill ); #http://lists.cistron.nl/pipermail/freeradius-users/2005-January/040184.html + if ( $cust_svc ) { + my $cust_pkg = $cust_svc->cust_pkg; + if ( $cust_pkg && $cust_pkg->part_pkg->is_prepaid && $cust_pkg->bill ) { + $check{'Expiration'} = time2str('%B %e %Y %T', $cust_pkg->bill ); #http://lists.cistron.nl/pipermail/freeradius-users/2005-January/040184.html + } + } else { + warn "WARNING: no cust_svc record for svc_acct.svcnum ". $self->svcnum. + "; can't set Expiration\n" + unless $cust_svc; } %check; |
