Bug 25770 - vars loggedinusername and loggedinusernumber should be replaced by use of logged_in_user in templates
Summary: vars loggedinusername and loggedinusernumber should be replaced by use of log...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 18403
Blocks:
  Show dependency treegraph
 
Reported: 2020-06-16 12:19 UTC by Fridolin Somers
Modified: 2023-12-12 01:09 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.