From Wikipedia, the free encyclopedia
Content deleted Content added
| Line 1: | Line 1: | ||
|
{{#if:{{{user|{{{1|}}}}}}|{{#ifeq:{{str sub new|{{{user|{{{1|}}}}}}|1|2}}|~2|1}}|{{#ifeq:{{str sub new|{{BASEPAGENAME}}|1|7|~2|1}}}}}} |
{{#if:{{{user|{{{1|}}}}}}|{{#ifeq:{{str sub new|{{{user|{{{1|}}}}}}|1|2}}|~2|1}}|{{#ifeq:{{str sub new|{{BASEPAGENAME}}|1|7|~2|1}}}}}} |
||
|
<noinclude> |
<noinclude> |
||
|
{{Documentation}}<!– Add categories to the /doc subpage, not here! –> |
{{Documentation}}<!– Add categories to the /doc subpage, not here! –> |
||
Revision as of 17:31, 9 November 2025
This metatemplate determines whether a user is a temporary account. It compares the first two characters of the username to ~2, a username prefix exclusively used by all temporary accounts. (There are no existing registered users with usernames starting with ~2, and attempting to register a new account with a username starting with ~2 returns an error.)
Usage
Use {{Is temporary account}} to determine whether the user identified in the current page title (via {{BASEPAGENAME}}) is a temporary account.
Alternatively, use {{Is temporary account|user}} to determine whether the specified user is a temporary account, replacing user with the username to evaluate.
The template returns 1 if the user is a temporary account, and a blank output if the user is not a temporary account.
TemplateData
Determines whether a user is a temporary account
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Username | user 1 |
Username to evaluate. Defaults to {{BASEPAGENAME}} if unspecified.
|
String | optional |
Examples
{{Is temporary account|~2025-00000-00}}
1
{{Is temporary account|Example}}

