Bug 22717

Summary: Google OAuth auto registration error
Product: Koha Reporter: Maya Das <mydsls>
Component: AuthenticationAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: critical    
Priority: P5 - low CC: chris, costalc, dpavlin, jonathan.druart, katrin.fischer, martin.renvoize, nick
Version: master   
Hardware: All   
OS: Linux   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22777
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.06
Bug Depends on: 20287    
Bug Blocks:    
Attachments: Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration
Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration

Description Maya Das 2019-04-16 17:28:26 UTC
while trying to register with google OAuth we are getting following error:

Can't use string ("firstname") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/Koha/Object.pm line 69
Comment 1 Jonathan Druart 2019-04-27 00:52:00 UTC
Hi Maya, which exact version of Koha are you using?
Comment 2 Jonathan Druart 2019-04-27 00:53:22 UTC
Created attachment 88974 [details] [review]
Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration

Silly bug caused by:
  commit ef410fd62f279a10687636a4f26babb2c91ecadc
  Bug 20287: Replace occurrences of AddMember with Koha::Patron->new->store->borrowernumber

Constructors take a hashref!
Comment 3 Jonathan Druart 2019-04-27 18:29:31 UTC
*** Bug 22777 has been marked as a duplicate of this bug. ***
Comment 4 Claudio Costales 2019-04-27 18:45:08 UTC
Hi Jonathan, I have just test this patch but still fails (same error, internal server error)
Comment 5 Jonathan Druart 2019-04-27 19:07:19 UTC
(In reply to Claudio from comment #4)
> Hi Jonathan, I have just test this patch but still fails (same error,
> internal server error)

Are you sure you restarted plack? Still getting the "Can't use string" error?
Comment 6 Claudio Costales 2019-04-27 19:14:43 UTC
I'm soooooooo sorry Jonathan, you're right. I restarted plack and all work fine again.

Thank you sooooo much for you patience..

If you agree I can sign this bug off.
Comment 7 Jonathan Druart 2019-04-27 19:25:00 UTC
No worries Claudio, thank you for testing!

If it works, you can sign it off!
Comment 8 Claudio Costales 2019-04-27 19:27:06 UTC
Tested! This patch solves the problem.
Comment 9 Chris Cormack 2019-04-29 21:44:36 UTC
Created attachment 89057 [details] [review]
Bug 22717: (bug 20287 follow-up) Fix Google OpenId auto registration

Silly bug caused by:
  commit ef410fd62f279a10687636a4f26babb2c91ecadc
  Bug 20287: Replace occurrences of AddMember with Koha::Patron->new->store->borrowernumber

Constructors take a hashref!

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Comment 10 Nick Clemens 2019-04-30 13:44:11 UTC
Awesome work all!

Pushed to master for 19.05
Comment 11 Maya Das 2019-05-02 19:15:07 UTC
Thank You All for this kind effort, the Bug was cause in 18.11.04
-Maya
Comment 12 Martin Renvoize 2019-05-08 14:09:37 UTC
Pushed to 18.11.x for 18.11.06