aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-adduser
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2011-03-14 16:30:33 +0100
committerStefan Kangas <skangas@skangas.se>2011-03-14 16:30:33 +0100
commitd04c66ffea981891c7c27d539ed8fe45cd9de307 (patch)
treead573079dd86b6bec5eaabd447f51814e7f11267 /fripost-adduser
parent2b7ec90b448c01266f6b5b5bf7ce87d66df7733d (diff)
Revert one simplification
Diffstat (limited to 'fripost-adduser')
-rwxr-xr-xfripost-adduser25
1 files changed, 16 insertions, 9 deletions
diff --git a/fripost-adduser b/fripost-adduser
index c8bfc84..9a2fa00 100755
--- a/fripost-adduser
+++ b/fripost-adduser
@@ -46,18 +46,25 @@ my $schema = Fripost::Schema->connect(
say "Adding a new virtual user.";
my $user;
{
+ my $username = prompt_email("New username: ", 'is_user');
+ my $name = prompt "Full (real) name: ";
+ my $domain = (split /\@/, $username)[1];
+ my $maildir = "$domain/". (split /\@/, $username)[0] . "/Maildir/"; # trailing slash important
+ my $active = 1;
+ my $password = prompt_password();
+
$user = {
- username => prompt_email("New username: ", 'is_user'),
- name => prompt "Full (real) name: ",
- domain => (split /\@/, $username)[1],
- maildir => "$domain/". (split /\@/, $username)[0] . "/Maildir/", # trailing slash important
- active => 1,
- password => prompt_password(),
+ username => $username,
+ name => $name,
+ domain => $domain,
+ maildir => $maildir,
+ active => $active,
+ password => $password,
};
- say "Username: $user->{username}";
- say "Name: $user->{name}";
- say "Password: (hidden)";
+ say "Username: $user->{username}";
+ say "Real name: $user->{name}";
+ say "Password: (hidden)";
confirm_or_abort();
}