Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Redirect after pass reset

  • Loading branch information...
commit 2bd95a1eb4e5570eb0d8a27b5525d750ecdd8e24 1 parent c7cd308
Zbigniew Lukasiak authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/WebPrototypes/ResetPass.pm
9 lib/WebPrototypes/ResetPass.pm
View
@@ -34,6 +34,9 @@ sub call {
if( $path eq '/reset' ){
return $self->_reset( $env );
}
+ if( $path eq '/after' ){
+ return $self->build_reply( "Password reset - you can now login with the new one" );
+ }
return $self->_index( $env );
}
@@ -105,7 +108,11 @@ sub _reset {
else{
if( $req->method eq 'POST' ){
$self->update_user( $user, { pass_token => undef, password => $req->param( 'password' ) } );
- return $self->build_reply( 'Password reset' );
+ return [
+ 301,
+ [ Location => 'after'],
+ [ $self->wrap_text( "Password reset" ) ]
+ ];
}
else{
my $encoded_name = url_encode_utf8( $name );
Please sign in to comment.
Something went wrong with that request. Please try again.