projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1da2eb3
)
fix domain method, and it works against old databases now too
author
ivan
<ivan>
Tue, 21 Aug 2001 03:03:36 +0000
(
03:03
+0000)
committer
ivan
<ivan>
Tue, 21 Aug 2001 03:03:36 +0000
(
03:03
+0000)
FS/FS/svc_acct.pm
patch
|
blob
|
history
diff --git
a/FS/FS/svc_acct.pm
b/FS/FS/svc_acct.pm
index
97117b5
..
9c95b21
100644
(file)
--- a/
FS/FS/svc_acct.pm
+++ b/
FS/FS/svc_acct.pm
@@
-3,7
+3,7
@@
package FS::svc_acct;
use strict;
use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin $username_letter $username_letterfirst
use strict;
use vars qw( @ISA $nossh_hack $conf $dir_prefix @shells $usernamemin
$usernamemax $passwordmin $username_letter $username_letterfirst
- $shellmachine $useradd $usermod $userdel
+ $shellmachine $useradd $usermod $userdel
$mydomain
@saltset @pw_set);
use Carp;
use FS::Conf;
@saltset @pw_set);
use Carp;
use FS::Conf;
@@
-50,6
+50,7
@@
$FS::UID::callback{'FS::svc_acct'} = sub {
}
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
}
$username_letter = $conf->exists('username-letter');
$username_letterfirst = $conf->exists('username-letterfirst');
+ $mydomain = $conf->config('domain');
};
@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' );
};
@saltset = ( 'a'..'z' , 'A'..'Z' , '0'..'9' , '.' , '/' );
@@
-604,13
+605,16
@@
sub radius_check {
Returns the domain associated with this account.
Returns the domain associated with this account.
-
-
cut
+
=
cut
sub domain {
my $self = shift;
sub domain {
my $self = shift;
- my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $self->domsvc } )
- or die "svc_acct.domsvc ". $self->domsvc." not found in svc_domain.svcnum";
- $svc_domain->domain;
+ if ( $self->domsvc ) {
+ my $svc_domain = qsearchs( 'svc_domain', { 'svcnum' => $self->domsvc } );
+ $svc_domain->domain;
+ } else {
+ $mydomain or die "svc_acct.domsvc is null and no legacy domain config file";
+ }
}
=item email
}
=item email
@@
-628,7
+632,7
@@
sub email {
=head1 VERSION
=head1 VERSION
-$Id: svc_acct.pm,v 1.2
7 2001-08-21 00:39:07
ivan Exp $
+$Id: svc_acct.pm,v 1.2
8 2001-08-21 03:03:36
ivan Exp $
=head1 BUGS
=head1 BUGS