Page MenuHomePhabricator

Test whether a user exists
Open, Needs TriagePublicFeature

Description

There should be a way in wikitext to test whether a user account exists.

{{#ifexist:User:Username}} only tests whether the user page exists.
I suggest a fourth option in https://www.mediawiki.org/wiki/Help:Magic_words#GENDER like:
{{GENDER:Username|male text|female text|text for unspecified|text for non-existing}}
If a fourth parameter is not given then return text for unspecified, as always happens now for non-existing users.

Use case one: Many templates take a username, e.g. userlink templates like https://en.wikipedia.org/wiki/Template:User. Such templates could say if the user doesn't exist (for example due to a typo).

Use case two: Some users incorrectly think an account doesn't exist when a red user page says the page doesn't exist. For their own account they think the account is broken. Red user pages display MediaWiki:Newarticletext which could be customized to say this user account exists but has not created an optional user page. If the account doesn't exist then MediaWiki:Userpage-userdoesnotexist is displayed but most users don't know that.

Event Timeline

Aklapper renamed this task from Feature request: Test whether user exists to Test whether a user exists.Oct 3 2023, 3:01 PM