Bug 21374: Fix self registration verification
authorJosef Moravec <josef.moravec@gmail.com>
Tue, 18 Sep 2018 20:17:46 +0000 (20:17 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 20 Sep 2018 12:34:43 +0000 (12:34 +0000)
Test plan:
0) Do not apply the patch
1) Set PatronSelfRegistration  to Allow
2) Set PatronSelfRegistrationVerifyByEmail to Require
3) Try to create a account using self registration and verify it (use link
    in e-mail or take the url from table mesage_queue ;)
    The verificatin url return ISE - DBIx::Class::Row::store_column(): No
    such column 'timestamp' on Koha::Schema::Result::Borrower
4) Apply the patch
5) Try to acces the verification url again - now it should work

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

opac/opac-registration-verify.pl

index 3748f5c..552b692 100755 (executable)
@@ -64,6 +64,8 @@ if (
     $patron_attrs->{password} ||= Koha::AuthUtils::generate_password;
 
     $patron_attrs->{categorycode} ||= C4::Context->preference('PatronSelfRegistrationDefaultCategory');
+    delete $patron_attrs->{timestamp};
+    delete $patron_attrs->{verification_token};
     my $patron = Koha::Patron->new( $patron_attrs )->store;
 
     if ($patron) {