https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8198
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor --- Comment #4 from Jonathan Druart <[email protected]> --- (In reply to Katrin Fischer from comment #3) > Is this still valid? Yes, it could be a code cleaning. So far we have to test if userenv is defined before accessing a key, for instance: C4/Accounts.pm: my $branchcode = C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef; My fix would still be valid, but we still need a test: C4/Accounts.pm: my $branchcode = exist C4::Context->userenv->{branch} ? C4::Context->userenv->{'branch'} : undef; which actually makes less sense. A better approach could be to have a ->logged_in_user method, to retrieve a Koha::Patron object, representing the logged in user. But it is a quite huge work, and nobody will sign it off, and rebases will be tricky ;) Lowering severity for now. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
