Problem/Motivation
In #3436395-37: UserRolesCacheContext can lead to poisoned cache returns for user 1, @alexpott wrote,
FWIW it would great to file a follow up to add a TRUE to the in_array in this code.
referring to this line:
return (in_array($role, $this->user->getRoles()) ? 'true' : 'false');
I am sure that at least one core committer will say that the else
after a return
should be removed.
Proposed resolution
Clean up the code.
Remaining tasks
User interface changes
None
Introduced terminology
None
API changes
None
Data model changes
None
Release notes snippet
N/A