From 321da7bb67f0f4adf0f66f174ec18e92c50447dd Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 3 Apr 2017 13:05:41 -0400 Subject: [PATCH] Bug 16892: Follow up use AddMember as per QA comment Same Test plan as before. --- opac/svc/auth/googleopenidconnect | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opac/svc/auth/googleopenidconnect b/opac/svc/auth/googleopenidconnect index eae7b34..c08b3c1 100755 --- a/opac/svc/auth/googleopenidconnect +++ b/opac/svc/auth/googleopenidconnect @@ -192,7 +192,7 @@ elsif ( defined $query->param('code') ) { my $categorycode = C4::Context->preference('GoogleOpenIDConnectDefaultCategory') // q{}; my $branchcode = C4::Context->preference('GoogleOpenIDConnectDefaultBranch') // q{}; my $password = undef; - $borrower = Koha::Patron->new( { + my $borrowernumber = C4::Members::AddMember( cardnumber => $cardnumber, firstname => $firstname, surname => $surname, @@ -200,9 +200,10 @@ elsif ( defined $query->param('code') ) { categorycode => $categorycode, branchcode => $branchcode, userid => $userid, - password => $password, - } ); - $borrower->store(); + password => $password + ); + $borrower = Koha::Patrons->find( { + borrowernumber => $borrowernumber } ); } my ( $userid, $cookie, $session_id ) = checkauth( $query, 1, {}, 'opac', $email ); -- 2.1.4