diff options
author | Stefan Kangas <skangas@skangas.se> | 2011-03-14 16:30:33 +0100 |
---|---|---|
committer | Stefan Kangas <skangas@skangas.se> | 2011-03-14 16:30:33 +0100 |
commit | d04c66ffea981891c7c27d539ed8fe45cd9de307 (patch) | |
tree | ad573079dd86b6bec5eaabd447f51814e7f11267 | |
parent | 2b7ec90b448c01266f6b5b5bf7ce87d66df7733d (diff) |
Revert one simplification
-rwxr-xr-x | fripost-adduser | 25 |
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(); } |