use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin
$shellmachine @saltset @pw_set);
+use Carp;
use FS::Conf;
use FS::Record qw( qsearchs fields );
use FS::svc_Common;
=item radius
+Depriciated, use radius_reply instead.
+
+=cut
+
+sub radius {
+ carp "FS::svc_acct::radius depriciated, use radius_reply";
+ $_[0]->radius_reply;
+}
+
+=item radius_reply
+
Returns key/value pairs, suitable for assigning to a hash, for any RADIUS
-attributes of this record.
+reply attributes of this record.
Note that this is now the preferred method for reading RADIUS attributes -
accessing the columns directly is discouraged, as the column names are
=cut
-sub radius {
+sub radius_reply {
my $self = shift;
map {
/^(radius_(.*))$/;
} grep { /^radius_/ && $self->getfield($_) } fields( $self->table );
}
+=item radius_check
+
+Returns key/value pairs, suitable for assigning to a hash, for any RADIUS
+check attributes of this record.
+
+Accessing RADIUS attributes directly is not supported and will break in the
+future.
+
=back
+sub radius_check {
+ my $self = shift;
+ map {
+ /^(rc_(.*))$/;
+ my($column, $attrib) = ($1, $2);
+ $attrib =~ s/_/\-/g;
+ ( $attrib, $self->getfield($column) );
+ } grep { /^rc_/ && $self->getfield($_) } fields( $self->table );
+}
+
=head1 VERSION
-$Id: svc_acct.pm,v 1.7 2000-06-29 11:56:52 ivan Exp $
+$Id: svc_acct.pm,v 1.9 2000-07-06 08:57:27 ivan Exp $
=head1 BUGS
The $recref stuff in sub check should be cleaned up.
+The suspend, unsuspend and cancel methods update the database, but not the
+current object. This is probably a bug as it's unexpected and
+counterintuitive.
+
=head1 SEE ALSO
L<FS::svc_Common>, L<FS::Record>, L<FS::Conf>, L<FS::cust_svc>,