aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-adduser
diff options
context:
space:
mode:
Diffstat (limited to 'fripost-adduser')
-rwxr-xr-xfripost-adduser4
1 files changed, 3 insertions, 1 deletions
diff --git a/fripost-adduser b/fripost-adduser
index e6bc5ab..e4a4298 100755
--- a/fripost-adduser
+++ b/fripost-adduser
@@ -83,7 +83,9 @@ if ($conf->{pretend}) {
exit 0;
}
-## TODO: Make sure the user does not already exist
+die "User already exists"
+ if ($schema->resultset('Mailbox')->search({
+ username => $user->{username} })->count);
## Insert user into database
my $db_user = $schema->resultset('Mailbox')->new($user);