diff options
Diffstat (limited to 'fripost-adduser')
-rwxr-xr-x | fripost-adduser | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fripost-adduser b/fripost-adduser index 633926e..168b80c 100755 --- a/fripost-adduser +++ b/fripost-adduser @@ -193,6 +193,10 @@ my ($domain, $login); { + # Error if the domain is unknown. + die "Error: Unknown domain `" .$domain. "'.\n" + unless $ldap->domain->search({ domain => $domain })->count; + # Ensure that the username doesn't already exist. die "Error: User `" .$user->{username}. "' already exists.\n" if $ldap->user->search({ username => $user->{username} })->count; @@ -206,10 +210,6 @@ my ($domain, $login); say STDERR ".)"; exit 1; } - - # Warn if the domain is unknown. - warn "WARN: Unknown domain `" .$domain. "'.\n" - unless $ldap->domain->search({ domain => $domain })->count; } |