From 921a99c5e31c3402551e79c0678ebed17d26ac5b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 12 Mar 2011 18:10:01 +0100 Subject: User must verify password once --- lib/Fripost/Prompt.pm | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/Fripost/Prompt.pm b/lib/Fripost/Prompt.pm index a857cc1..f7db34c 100755 --- a/lib/Fripost/Prompt.pm +++ b/lib/Fripost/Prompt.pm @@ -30,9 +30,20 @@ sub fix_username { } sub prompt_password { - my $prompt = shift; + my ($prompt, $prompt2) = @_; $prompt //= "Enter new password (blank for random): "; - my $password = prompt $prompt, -e => '*'; + $prompt2 //= "Enter new password again (blank for random): "; + + my $password; + while (not defined $password) { + $password = prompt $prompt, -e => '*'; + my $confirm = prompt $prompt2, -e => '*'; + unless ($password eq $confirm) { + undef $password; + say "Passwords do not match"; + } + } + if (!length $password) { $password = mkpasswd( -length => 10, -- cgit v1.2.3 From 99411e118c9353e9ace7508059dfea0f708963e2 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 12 Mar 2011 20:39:39 +0100 Subject: Fix email --- templ/new_user_mail.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templ/new_user_mail.tt b/templ/new_user_mail.tt index 0a1319b..ba72c57 100644 --- a/templ/new_user_mail.tt +++ b/templ/new_user_mail.tt @@ -10,7 +10,7 @@ Du kan bli medlem genom att skicka ett mail till Frågor gällande specifikt ditt konto kan du ta direkt med administratörerna. - admin@lists.fripost.org + admin@fripost.org Vi försöker bygga upp medlemswikin till att bli den bästa resursen för intern information kring föreningen. Du får gärna hjälpa till! -- cgit v1.2.3