diff options
author | ivan <ivan> | 2003-09-30 15:01:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-09-30 15:01:42 +0000 |
commit | 8f81a29fe1ac874e7fdad0f651297e0b340a663f (patch) | |
tree | 1020496924f944e7fa0a02169c3b14f2fbcc16cd | |
parent | c3f79630e79a90e4eb679a509c201aef1f0fc258 (diff) |
no duplicate usernames
-rw-r--r-- | FS/FS/agent.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/FS/FS/agent.pm b/FS/FS/agent.pm index 3f1495ae8..9b7492d07 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(''); @@ -166,7 +169,7 @@ sub pkgpart_hashref { =head1 VERSION -$Id: agent.pm,v 1.3.4.1 2003-09-29 05:51:48 ivan Exp $ +$Id: agent.pm,v 1.3.4.2 2003-09-30 15:01:42 ivan Exp $ =head1 BUGS |