]> git.koha-community.org Git - koha.git/commit
Bug 21096: Do not display loggedinusername in template
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 25 Jul 2018 15:25:58 +0000 (12:25 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 5 Sep 2018 09:57:15 +0000 (10:57 +0100)
commitf9f8c6bbd0afeafa09554cf98f551228a6607952
tree4948c5d22204c4a9916c54cdd7bd12fb732d3b73
parenta87364d0ffbf906a4888f5d6d66e1a74cf280f58
Bug 21096: Do not display loggedinusername in template

This patch is a little fix for a much bigger hidden issues.

The original issue:
1. Set the firstname and surname values of a paontr to utf-8 characters
("wide characters"), for instance 月月
2. Use this patron to login at the staff interface
=> In the header the logged in patron's info (concat of firstname and
surname) are displayed correctly
3. Hit whatever link
=> In the header the info are now displayed incorrectly
("ææ")

What happens?
After that the user loggin, loggedinusername is set with the value from
the DB (borrowers.userid)
On next hits it is picked from the session (which contains the decoded
utf8 value, see first lines of C4::Context->set_userenv)
From C4::Auth::checkauth:
834             $s_userid = $session->param('id') // ''

The quick fix is to use the logged_in_user variable in the template, but
it seems that issues may occurred if external authentication is used
(ldap, shib, cas). Could someone test this?

Test plan:
Make sure the original issue is fixed

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit be691d86e35acebace0f1576ea9380f405dd55ce)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Auth.pm
koha-tmpl/intranet-tmpl/prog/en/includes/header.inc
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt
koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/add-modify.tt
koha-tmpl/intranet-tmpl/prog/en/modules/serials/subscription-add.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt