@@ -, +, @@ --- .../prog/en/modules/opac-registration-invalid.tt | 30 +++++++++++++++++ opac/opac-registration-verify.pl | 34 ++++++++++++------- 2 files changed, 51 insertions(+), 13 deletions(-) create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-registration-invalid.tt @@ -0,0 +1,30 @@ +[% INCLUDE 'doc-head-open.inc' %] +[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog +[% INCLUDE 'doc-head-close.inc' %] + + +[% IF ( OpacNav ) %]
[% ELSE %]
[% END %] +
+[% INCLUDE 'masthead.inc' %] + +
+
+
+
+

Registration invalid!

+ +

There were problems processing your registration. Please contact your library for help.

+ +
+
+
+
+ +[% IF ( OpacNav ) %]
+
+ [% INCLUDE 'navigation.inc' %] +
+[% END %] + +
+[% INCLUDE 'opac-bottom.inc' %] --- a/opac/opac-registration-verify.pl +++ a/opac/opac-registration-verify.pl @@ -32,22 +32,23 @@ unless ( C4::Context->preference('PatronSelfRegistration') ) { exit; } -my ( $template, $borrowernumber, $cookie ) = get_template_and_user( - { - template_name => "opac-registration-confirmation.tmpl", - type => "opac", - query => $cgi, - authnotrequired => 1, - } -); - -$template->param( - OpacPasswordChange => C4::Context->preference('OpacPasswordChange') ); - my $token = $cgi->param('token'); my $m = Koha::Borrower::Modifications->new( verification_token => $token ); +my ( $template, $borrowernumber, $cookie ); if ( $m->Verify() ) { + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "opac-registration-confirmation.tmpl", + type => "opac", + query => $cgi, + authnotrequired => 1, + } + ); + + $template->param( + OpacPasswordChange => C4::Context->preference('OpacPasswordChange') ); + my $borrower = $m->GetModifications(); my $password; @@ -68,7 +69,14 @@ if ( $m->Verify() ) { } else { - + ( $template, $borrowernumber, $cookie ) = get_template_and_user( + { + template_name => "opac-registration-invalid.tmpl", + type => "opac", + query => $cgi, + authnotrequired => 1, + } + ); } output_html_with_http_headers $cgi, $cookie, $template->output; --