What is the problem?
If $user is hidden/suppressed by a block, a regular/anon. user can still go to Special:UserRights/$user and see $user's group memberships.
Instead, should it behave as if $user did not exist?
$user will not show up in the prefix search on Special:UserRights. So, I guess you would have to know their exact username already, unless you were very lucky.
Steps to reproduce problem
- Login as a user with oversight rights
- Go to Special:Block/$user, make an indefinite sitewide block and select "Hide username from edits and lists"
- Logout and go to Special:UserRights/$user
Expected behavior: Page should say something like: There is no user by the name "$user". Check your spelling.
Observed behavior: Page has link to $user's User, Talk and Contributions page. Lists $user's group membership.
Environment
Wiki(s): MediaWiki 1.34.0-alpha (f0c2414) 21:03, 10 September 2019 and 1.32.1.