Template:GetUser
This template takes a single non-named parameter and determine which user it is referring to. To this end, the template assumes that the provided parameter is
- a) a display name, such as users are supposed to set on their user page using property [[Displayname::]], or
- b) a user login name.
This template produces NO output, but after it has been called, there will exist two variables that you can use as you please:
- {{#var|displayname}} will contain the user's display name (or the given parameter surrounded by question marks)
- {{#var|userpage}} will contain the user's userpage without the User: prefix (or the string "Unknown").
This makes it possible to construct nice links such as [[User:{{#var:userpage}}|{{#var:displayname}}]]
Suppose there's a user "John Doe" with userpage User:John Doe, on which is defined [[displayname::John F. Doe]], and suppose that user Yohn Doe does not exist (it's a typo). Then
- {{GetUser|John Doe}} results in {{#var|displayname}} = John F. Doe and {{#var|userpage}} = John Doe
- {{GetUser|John F. Doe}} results in {{#var|displayname}} = John F. Doe and {{#var|userpage}} = John Doe
- {{GetUser|Yohn Doe}} results in {{#var|displayname}} = ?Yohn Doe? and {{#var|userpage}} = Unknown
The above documentation is transcluded from Template:GetUser/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |