Template:GetUser
Jump to navigation
Jump to search
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 "JDoe" with userpage User:JDoe, on which is defined [[displayname::John Doe]], and suppose that user JDeo does not exist (it's a typo). Then
- {{GetUser|JDoe}} results in {{#var|displayname}} = John Doe and {{#var|userpage}} = JDoe
- {{GetUser|John Doe}} results in {{#var|displayname}} = John Doe and {{#var|userpage}} = JDoe
- {{GetUser|JDeo}} results in {{#var|displayname}} = ?JDeo? and {{#var|userpage}} = Unknown