[Bps-public-commit] rt-extension-resetpassword branch, new-user-create-password, updated. 1.04-4-g137eed9

Craig Kaiser craig at bestpractical.com
Wed Feb 5 15:30:56 EST 2020


The branch, new-user-create-password has been updated
       via  137eed98c27aae14345124fd1f0f053647eafa8a (commit)
      from  d4ac621b450fefa690439026cf6937481a31b06e (commit)

Summary of changes:
 html/NoAuth/ResetPassword/NewUser.html | 7 +++++--
 html/NoAuth/ResetPassword/Request.html | 6 +++++-
 2 files changed, 10 insertions(+), 3 deletions(-)

- Log -----------------------------------------------------------------
commit 137eed98c27aae14345124fd1f0f053647eafa8a
Author: Craig Kaiser <craig at bestpractical.com>
Date:   Wed Feb 5 15:30:52 2020 -0500

    Redirect to login page on password reset email success

diff --git a/html/NoAuth/ResetPassword/NewUser.html b/html/NoAuth/ResetPassword/NewUser.html
index dbf5aec..06aa729 100644
--- a/html/NoAuth/ResetPassword/NewUser.html
+++ b/html/NoAuth/ResetPassword/NewUser.html
@@ -45,7 +45,7 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title &>
+<& /Elements/Header, Title => $title, Refresh => $refresh &>
 <div id="body" class="login-body">
 
 <h1><%$title%></h1>
@@ -56,7 +56,6 @@
     <&|/l&>Email address</&>:<input name="Email" value="" />
     <input type="submit" class="button" value="<%loc('Send it!')%>" />
 </form>
-<a href="<%$RT::WebURL|n%>"><&|/l&>Login</&></a>
 </div>
 
 <%INIT>
@@ -64,6 +63,7 @@ my @actions;
 
 my $title = loc("Create your password");
 
+my $refresh;
 if ($ARGS{'Email'}) {
     my $u = RT::User->new($RT::SystemUser);
     $u->LoadByCols(EmailAddress => $ARGS{'Email'});
@@ -74,6 +74,9 @@ if ($ARGS{'Email'}) {
         if ($status) {
             push @actions, loc("RT has sent you an email message with instructions about how to reset your password");
             RT->Logger->info("Password reset token send to " . $u->EmailAddress);
+
+            $m->notes->{RefreshURL} = RT->Config->Get('WebPath')."/";
+            $refresh = 2;
         } else {
             push @actions, loc("Failed to send password reset token, please contact your RT administrator.");
             RT->Logger->error("Failed to send password reset token to " . $u->EmailAddress . ": $msg");
diff --git a/html/NoAuth/ResetPassword/Request.html b/html/NoAuth/ResetPassword/Request.html
index 8a45b20..6502238 100644
--- a/html/NoAuth/ResetPassword/Request.html
+++ b/html/NoAuth/ResetPassword/Request.html
@@ -43,7 +43,7 @@
 %# those contributions and any derivatives thereof.
 %# 
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title &>
+<& /Elements/Header, Title => $title, Refresh => $refresh &>
 <div id="body" class="login-body">
 
 <h1><%$title%></h1>
@@ -61,6 +61,7 @@ my @actions;
 
 my $title = loc("Reset your password");
 
+my $refresh;
 if ($ARGS{'Email'}) {
     my $u = RT::User->new($RT::SystemUser);
     $u->LoadByCols(EmailAddress => $ARGS{'Email'});
@@ -70,6 +71,9 @@ if ($ARGS{'Email'}) {
         if ($status) {
             push @actions, loc("RT has sent you an email message with instructions about how to reset your password");
             RT->Logger->info("Password reset token send to " . $u->EmailAddress);
+
+            $m->notes->{RefreshURL} = RT->Config->Get('WebPath')."/";
+            $refresh = 2;
         } else {
             push @actions, loc("Failed to send password reset token, please contact your RT administrator.");
             RT->Logger->error("Failed to send password reset token to " . $u->EmailAddress . ": $msg");

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


More information about the Bps-public-commit mailing list