[Jifty-commit] r2980 - in jifty/trunk: lib/Jifty/Plugin/Authentication/Password/Notification

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Mar 16 01:09:44 EDT 2007


Author: jesse
Date: Fri Mar 16 01:09:42 2007
New Revision: 2980

Added:
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm   (contents, props changed)
   jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm   (contents, props changed)
Modified:
   jifty/trunk/   (props changed)

Log:
 r53502 at pinglin:  jesse | 2007-03-16 00:57:18 -0400
 * oops. should have been committed before


Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmEmail.pm	Fri Mar 16 01:09:42 2007
@@ -0,0 +1,52 @@
+use warnings;
+use strict;
+
+package Jifty::Plugin::Authentication::Password::Notification::ConfirmEmail;
+use base qw/Jifty::Notification/;
+
+=head1 NAME
+
+Doxory::Notification::ConfirmEmail
+
+=head1 ARGUMENTS
+
+C<to>, a L<Doxory::Model::User> whose address we are confirming.
+
+=cut
+
+=head2 setup
+
+Sets up the fields of the message.
+
+=cut
+
+sub setup {
+    my $self = shift;
+
+    my $LoginUser   = Jifty->app_class('Model', 'User');
+
+    unless ( UNIVERSAL::isa($self->to, $LoginUser) ){
+	$self->log->error((ref $self) . " called with invalid user argument");
+	return;
+    } 
+   
+
+    my $letme = Jifty::LetMe->new();
+    $letme->email($self->to->email);
+    $letme->path('confirm_email'); 
+    my $confirm_url = $letme->as_url;
+    my $appname = Jifty->config->framework('ApplicationName');
+
+    $self->subject( _("Welcome to %1!",$appname ));
+    $self->body(_("
+You're getting this message because you (or somebody claiming to be you)
+wants to use %1. 
+
+We need to make sure that we got your email address right.  Click on the link below to get started:
+
+%2
+",$appname,$confirm_url));
+
+}
+
+1;

Added: jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Plugin/Authentication/Password/Notification/ConfirmLostPassword.pm	Fri Mar 16 01:09:42 2007
@@ -0,0 +1,52 @@
+use warnings;
+use strict;
+
+package Jifty::Plugin::Authentication::Password::Notification::ConfirmLostPassword;
+use base qw/Jifty::Notification/;
+
+=head1 NAME
+
+Doxory::Notification::ConfirmLostPassword
+
+=head1 ARGUMENTS
+
+C<to>, a L<$YourApp::Model::User> whose address we are confirming.
+
+=cut
+
+=head2 setup
+
+Sets up the fields of the message.
+
+=cut
+
+sub setup {
+    my $self = shift;
+    my $LoginUser   = Jifty->app_class('Model', 'User');
+
+    unless ( UNIVERSAL::isa($self->to, $LoginUser) ){
+    $self->log->error((ref $self) . " called with invalid user argument");
+    return;
+    }
+
+    my $letme = Jifty::LetMe->new();
+    $letme->email($self->to->email);
+    $letme->path('reset_lost_password');
+    my $confirm_url = $letme->as_url;
+    my $appname = Jifty->config->framework('ApplicationName');
+
+    $self->body(_("
+You're getting this message because you (or somebody claiming to be you)
+request to reset your password for %1.
+
+If you don't want to reset your password just ignore this message.
+
+To reset your password, click on the link below:
+
+%2
+",$appname,$confirm_url));
+
+}
+
+1;
+


More information about the Jifty-commit mailing list