%hash = $record->radius_check;
+ $domain = $record->domain;
+
+ $svc_domain = $record->svc_domain;
+
+ $email = $record->email;
+
+ $seconds_since = $record->seconds_since($timestamp);
+
=head1 DESCRIPTION
An FS::svc_acct object represents an account. FS::svc_acct inherits from
}
if ( $icradius_dbh ) {
- my $queue = new FS::queue { 'job' => 'FS::svc_acct::icradius_rc_delete' };
- $error = $queue->insert( $self->username );
+ my $radcheck_queue =
+ new FS::queue { 'job' => 'FS::svc_acct::icradius_rc_delete' };
+ $error = $radcheck_queue->insert( $self->username );
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "queueing job (transaction rolled back): $error";
}
- my $queue = new FS::queue { 'job' => 'FS::svc_acct::icradius_rr_delete' };
- $error = $queue->insert( $self->username );
+ my $radreply_queue =
+ new FS::queue { 'job' => 'FS::svc_acct::icradius_rr_delete' };
+ $error = $radreply_queue->insert( $self->username );
if ( $error ) {
$dbh->rollback if $oldAutoCommit;
return "queueing job (transaction rolled back): $error";
( $FS::raddb::attrib{lc($attrib)}, $self->getfield($column) );
} grep { /^radius_/ && $self->getfield($_) } fields( $self->table );
if ( $self->ip && $self->ip ne '0e0' ) {
- $reply{Framed-IP-Address} = $self->ip;
+ $reply{'Framed-IP-Address'} = $self->ip;
}
%reply;
}
: qsearchs( 'svc_domain', { 'svcnum' => $self->domsvc } );
}
+=item cust_svc
+
+Returns the FS::cust_svc record for this account (see L<FS::cust_svc>).
+
+sub cust_svc {
+ my $self = shift;
+ qsearchs( 'cust_svc', { 'svcnum' => $self->svcnum } );
+}
+
=item email
Returns an email address associated with the account.
$self->username. '@'. $self->domain;
}
+=item seconds_since TIMESTAMP
+
+Returns the number of seconds this account has been online since TIMESTAMP.
+See L<FS::session>
+
+TIMESTAMP is specified as a UNIX timestamp; see L<perlfunc/"time">. Also see
+L<Time::Local> and L<Date::Parse> for conversion functions.
+
+=cut
+
+#note: POD here, implementation in FS::cust_svc
+sub seconds_since {
+ my $self = shift;
+ $self->cust_svc->seconds_since(@_);
+}
+
=item ssh
=cut
=head1 VERSION
-$Id: svc_acct.pm,v 1.62 2002-01-16 15:37:42 ivan Exp $
+$Id: svc_acct.pm,v 1.64 2002-01-29 16:33:15 ivan Exp $
=head1 BUGS