Bug 25770

Summary: vars loggedinusername and loggedinusernumber should be replaced by use of logged_in_user in templates
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21137
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25765
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18403    
Bug Blocks:    

Description Fridolin Somers 2020-06-16 12:19:52 UTC
Since all templates have the current loggedin user as logged_in_user var (a Koha::Patron object),
vars loggedinusername and loggedinusernumber should be replaced in templates.
Comment 1 Katrin Fischer 2023-12-10 09:56:16 UTC
Can you explain this one a bit more?
Comment 2 Jonathan Druart 2023-12-11 10:06:51 UTC
See comments on those 2 lines:

C4/Auth.pm:        $template->param( loggedinusername   => $user ); # OBSOLETE - Do not reuse this in template, use logged_in_user.userid instead

C4/Auth.pm:        $template->param( loggedinusernumber => $borrowernumber ); # FIXME Should be replaced with logged_in_user.borrowernumber
Comment 3 Fridolin Somers 2023-12-12 01:09:24 UTC
Thanks a lot Jonathan.

This is indeed where params are sent to template.

All templates have var logged_in_user.

I'll try to create a patch.