From 398ea7cb9db24b571c867092a9960fa91bee186d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Mon, 29 Dec 2008 22:11:08 +0000 Subject: [PATCH] Forward porting email authentication message on account activation. --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Auth/WebGUI.pm | 10 +++++++--- lib/WebGUI/i18n/English/AuthWebGUI.pm | 6 ++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index ea09e0901..2727d8123 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -16,6 +16,7 @@ - fixed #9374: Subscription Asset: Redeem subscription template not documented, or user selectable - fixed #9366: Gallery: Missing i18n - fixed #9367: Gallery: Errors in templates + - fixed #9352: Account activation message MIA 7.6.7 - fixed #9263: Thingy possibleValues processing, and List type autodetection. diff --git a/lib/WebGUI/Auth/WebGUI.pm b/lib/WebGUI/Auth/WebGUI.pm index 208a7d14a..eeb308e06 100644 --- a/lib/WebGUI/Auth/WebGUI.pm +++ b/lib/WebGUI/Auth/WebGUI.pm @@ -1211,13 +1211,17 @@ sub resetExpiredPasswordSave { #------------------------------------------------------------------- sub validateEmail { my $self = shift; - my ($userId) = $self->session->db->quickArray("select userId from authentication where fieldData=? and fieldName='emailValidationKey' and authMethod='WebGUI'", [$self->session->form->process("key")]); + my $session = $self->session; + my ($userId) = $session->db->quickArray("select userId from authentication where fieldData=? and fieldName='emailValidationKey' and authMethod='WebGUI'", [$session->form->process("key")]); + my $i18n = WebGUI::International->new($session, 'AuthWebGUI'); + my $message = ''; if (defined $userId) { - my $u = WebGUI::User->new($self->session,$userId); + my $u = WebGUI::User->new($session,$userId); $u->status("Active"); $self->session->db->write("DELETE FROM authentication WHERE userId = ? AND fieldName = 'emailValidationKey'", [$userId]); + $message = $i18n->get('email validation confirmed','AuthWebGUI'); } - return $self->displayLogin; + return $self->displayLogin($message); } diff --git a/lib/WebGUI/i18n/English/AuthWebGUI.pm b/lib/WebGUI/i18n/English/AuthWebGUI.pm index 82a050b48..dbc8241c1 100644 --- a/lib/WebGUI/i18n/English/AuthWebGUI.pm +++ b/lib/WebGUI/i18n/English/AuthWebGUI.pm @@ -107,6 +107,12 @@ our $I18N = { lastUpdated => 1078852836 }, + 'email validation confirmed' => { + message => q|Thank you for activating your account. You may now log in with your username and password.|, + context => q|Message displayed to the user after they validate their email address.|, + lastUpdated => 1230588145, + }, + 'display account template title' => { message => q|WebGUI Authentication Display Account Template|, lastUpdated => 1078852836