UX: Do not include current user in group-filtered directory results (PR #11310)

At the moment, when filtering by username/name/group, the directory will unconditionally return the current user at the top of the list. This is quite unexpected, given that the user is deliberately trying to filter the list. This commit makes sure the ‘include current user’ logic only triggers for unfiltered directories

Related discussion in https://meta.discourse.org/t/user-card-directory/144479/47

GitHub

This pull request has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/user-card-directory/144479/50

The title of this pull request changed from “UX: Do not include current user in filtered directory results” to "UX: Do not include current user in group-filtered directory results