summaryrefslogtreecommitdiff
path: root/FS/FS/agent.pm
diff options
context:
space:
mode:
Diffstat (limited to 'FS/FS/agent.pm')
-rw-r--r--FS/FS/agent.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm
index bcba602..2f70d65 100644
--- a/FS/FS/agent.pm
+++ b/FS/FS/agent.pm
@@ -125,6 +125,9 @@ sub check {
$error = $self->ut_alphan('username');
return $error if $error;
if ( length($self->username) ) {
+ my $conflict = qsearchs('agent', { 'username' => $self->username } );
+ return 'duplicate agent username (with '. $conflict->agent. ')'
+ if $conflict;
$error = $self->ut_text('password'); # ut_text... arbitrary choice
} else {
$self->_password('');
@@ -165,7 +168,7 @@ sub pkgpart_hashref {
=head1 VERSION
-$Id: agent.pm,v 1.5 2003-09-29 05:51:50 ivan Exp $
+$Id: agent.pm,v 1.6 2003-09-30 15:01:46 ivan Exp $
=head1 BUGS