aboutsummaryrefslogtreecommitdiffstats
path: root/fripost-adduser
diff options
context:
space:
mode:
authorStefan Kangas <skangas@skangas.se>2011-03-14 15:14:06 +0100
committerStefan Kangas <skangas@skangas.se>2011-03-14 15:14:06 +0100
commit6238a0b2d98b59a99c5eab89b15d5686ba6858f3 (patch)
tree95469710c6451fedfcdb46b61659662056feb95b /fripost-adduser
parent65590a4ed002ebcecdec5fb5286895e9ecbc6209 (diff)
Fix bug
Diffstat (limited to 'fripost-adduser')
-rwxr-xr-xfripost-adduser5
1 files changed, 3 insertions, 2 deletions
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