[Bps-public-commit] rt-extension-resetpassword branch, master, updated. 1.04-16-g7565d8a

? sunnavy sunnavy at bestpractical.com
Thu Mar 5 09:06:02 EST 2020


The branch, master has been updated
       via  7565d8a263feae2affc3ab42f8dd94b614d957b4 (commit)
       via  6b0d5ac5a13a908191b55b30eacf3e7f33aca23a (commit)
       via  3cc4a9e7c063524a6217d357e9abd7adc7490a6e (commit)
       via  8db934a29a189f7d2a703a90394530ed461823b5 (commit)
       via  f697a13a6585467797dbe6335b99df15f65c3fa7 (commit)
       via  1df51d0a863f9bb726c71f38e4e508ead83a0338 (commit)
       via  fb4c7df007c08527c089beaa3b0c5ac43ecb4858 (commit)
       via  f7e0bd34c08279265ef22a09595746a96ba86d2f (commit)
       via  35488a2932f8f9b9c629168ff6feb31915bb77ed (commit)
       via  d804c2bc4852e52b4c7b249a4b0a8dca49e81f88 (commit)
       via  2f2dab292cfa626eb1d6c6b54225b9b520853210 (commit)
       via  095f7cc2fd90845e6d02cd8c36ab0b657b8e6315 (commit)
       via  65b32fc519384ee8ad8fcbaa0070aabca4ad001a (commit)
      from  42a05febb44675eb0b60b8d47c7ffbbe9cb734d0 (commit)

Summary of changes:
 MANIFEST                                           |  3 +
 README                                             | 61 ++++++++++++--
 .../Admin/Users/Modify.html/BeforeCreate           |  7 ++
 .../Admin/Users/Modify.html/BeforeUpdate           | 26 ++++++
 .../Elements/Login/Default                         | 10 ++-
 html/Elements/EditPassword                         | 84 +++++++++++++++++++
 html/NoAuth/ResetPassword/Request.html             | 90 ++++++++++++++------
 lib/RT/Extension/ResetPassword.pm                  | 97 ++++++++++++++++++++--
 8 files changed, 342 insertions(+), 36 deletions(-)
 create mode 100644 html/Callbacks/RT-Extension-ResetPassword/Admin/Users/Modify.html/BeforeCreate
 create mode 100644 html/Callbacks/RT-Extension-ResetPassword/Admin/Users/Modify.html/BeforeUpdate
 create mode 100644 html/Elements/EditPassword

- Log -----------------------------------------------------------------
commit 6b0d5ac5a13a908191b55b30eacf3e7f33aca23a
Merge: 42a05fe 3cc4a9e
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 5 21:36:05 2020 +0800

    Merge branch 'new-user-create-password'

diff --cc lib/RT/Extension/ResetPassword.pm
index 889f085,7d1be60..3d36329
--- a/lib/RT/Extension/ResetPassword.pm
+++ b/lib/RT/Extension/ResetPassword.pm
@@@ -3,8 -3,35 +3,35 @@@ package RT::Extension::ResetPassword
  use strict;
  use warnings;
  
 -our $VERSION = '1.04';
 +our $VERSION = '1.05';
  
+ sub CreateTokenAndResetPassword {
+     my $user = shift;
+ 
+     unless ( $user && $user->Id ) {
+         RT::Logger->error( "Need to provide a loaded RT::User object for CreateTokenAndResetPassword." );
+         return;
+     }
+ 
+     my $token = Digest::MD5->new()->add(
+         $user->id,
+         $user->__Value('Password'),
+         $RT::DatabasePassword,
+         $user->LastUpdated,
+         @{[$RT::WebPath]} . '/NoAuth/ResetPassword/Reset'
+     )->hexdigest();
+ 
+     my ($status, $msg) = RT::Interface::Email::SendEmailUsingTemplate(
+         To        => $user->EmailAddress,
+         Template  => 'PasswordReset',
+         Arguments => {
+             Token => $token,
+             User  => $user,
+         },
+     );
+     return ($status, $msg);
+ }
+ 
  =head1 NAME
  
  RT::Extension::ResetPassword - add "forgot your password?" link to RT instance

commit 7565d8a263feae2affc3ab42f8dd94b614d957b4
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Mar 5 22:04:38 2020 +0800

    Update manifest to include new components in new-user-create-password

diff --git a/MANIFEST b/MANIFEST
index 31c6072..a9bcf8e 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,6 +1,9 @@
 Changes
 etc/initialdata
+html/Callbacks/RT-Extension-ResetPassword/Admin/Users/Modify.html/BeforeCreate
+html/Callbacks/RT-Extension-ResetPassword/Admin/Users/Modify.html/BeforeUpdate
 html/Callbacks/RT-Extension-ResetPassword/Elements/Login/Default
+html/Elements/EditPassword
 html/NoAuth/ResetPassword/Request.html
 html/NoAuth/ResetPassword/Reset/dhandler
 inc/Module/Install.pm

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list