diff options
| author | ivan <ivan> | 2003-09-30 15:01:46 +0000 | 
|---|---|---|
| committer | ivan <ivan> | 2003-09-30 15:01:46 +0000 | 
| commit | c1dfeada58be61ec33bb1cfb80a2cff73f7c9a3c (patch) | |
| tree | 8b57a6c7d9415c4a15437c6d01a61f4bbea10e02 /FS | |
| parent | 021e1ac77366fb0765cb364af0c09f5f2df92266 (diff) | |
no duplicate usernames
Diffstat (limited to 'FS')
| -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 bcba602cc..2f70d654d 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  | 
