From 6238a0b2d98b59a99c5eab89b15d5686ba6858f3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 14 Mar 2011 15:14:06 +0100 Subject: Fix bug --- fripost-adduser | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'fripost-adduser') diff --git a/fripost-adduser b/fripost-adduser index 89a4031..5153a18 100755 --- a/fripost-adduser +++ b/fripost-adduser @@ -44,8 +44,9 @@ my $schema = Fripost::Schema->connect( ); say "Adding a new virtual user."; +my $user; { - my $user = { + $user = { username => prompt_email("New username: ", 'is_user'), name => prompt "Full (real) name: ", domain => (split /\@/, $username)[1], @@ -78,7 +79,7 @@ say "New account $user->{username} added."; ## Send email my $msg = MIME::Lite->new( From => 'admin@fripost.org', - To => 'test@example.com', + To => $user->{username}, Subject => "=?UTF-8?B?" . encode_base64(encode("utf8", 'Välkommen till Fripost!'), "") . "?=", Data => scalar slurp('templ/new_user_mail.tt'), # TODO: actually use TT -- cgit v1.2.3