User search always finds self

When using More → User, when a filtered match is found, the list always includes the user executing the search. When there is no match, the list is empty i.e. zero entries for no match, 2 or more entries for a match. Tested using multiple user accounts - same result.

I upgraded this weekend. Not sure if a new issue related to that or if a pre-existing condition. Previous upgrade was around Christmas and certainly didn’t notice this misbehaviour, so I think it is recent.

Confirmed same here on meta…

1 Like

I think it has always been that way

3 Likes

I appreciate the pointer to the related topic. However, the reply in that topic says “I think that’s by design”. It’s a thought, but not an explanation. To me, the behaviour I reported is counter-intuitive. If it’s not a bug, I’d like to understand why the current behaviour is the desired/designed behaviour. I can’t think of a good reason myself.

2 Likes

The user directory is also an activity leaderboard, so always showing your own account allows you to easily compare statistics.

I believe this is also why we show the current user at the top of the unfiltered list a second time, in addition to the natural placement further down the list, so you don’t have to endlessly scroll or filter to compare your own statistics.

4 Likes

Thanks. Something like that, I can get my head around. And that logic aligns with highlighting self with colour in the filtered list. I just hope I can remember when my users ask.

2 Likes

It’s a little convoluted, but if you wanted to add some CSS (admin > customize > themes) to disable this behavior in filtered results… it’s possible:

.directory:has(.filter-name:not(:placeholder-shown)) .me {
  display: none;
}

this essentially says “if the directory filter is not showing the placeholder (i.e., a term has been entered) then don’t display my account in the results”

but note this would also remove yourself from matching filters, so it’s an imperfect workaround

4 Likes