https://www.infra-repository.org/oiar/index.php?title=Template:GetUser/doc&feed=atom&action=historyTemplate:GetUser/doc - Revision history2024-03-29T00:07:55ZRevision history for this page on the wikiMediaWiki 1.40.0https://www.infra-repository.org/oiar/index.php?title=Template:GetUser/doc&diff=333&oldid=prevJan Schoonderbeek: doc added2013-03-29T19:24:54Z<p>doc added</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --><br />
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<br />
: a) a display name, such as users are supposed to set on their user page using property <nowiki>[[</nowiki>[[:Property:Displayname|Displayname::]]<nowiki>]]</nowiki>, or<br />
: b) a [[Special:ActiveUsers|user login name]].<br />
This template produces ''NO output'', but after it has been called, there will exist two variables that you can use as you please:<br />
: <nowiki>{{#var|displayname}}</nowiki> will contain the user's display name (or the given parameter surrounded by question marks)<br />
: <nowiki>{{#var|userpage}}</nowiki> will contain the user's userpage without the ''User:'' prefix (or the string "Unknown").<br />
This makes it possible to construct nice links such as <nowiki>[[User:{{#var:userpage}}|{{#var:displayname}}]]</nowiki><br />
<br />
Suppose there's a user "'''John Doe'''" with userpage '''User:John Doe''', on which is defined '''<nowiki>[[displayname::John F. Doe]]</nowiki>''', and suppose that user Yohn Doe does not exist (it's a typo). Then<br />
:<nowiki>{{GetUser|John Doe}}</nowiki> results in <nowiki>{{#var|displayname}}</nowiki> = John F. Doe and <nowiki>{{#var|userpage}}</nowiki> = John Doe<br />
:<nowiki>{{GetUser|John F. Doe}}</nowiki> results in <nowiki>{{#var|displayname}}</nowiki> = John F. Doe and <nowiki>{{#var|userpage}}</nowiki> = John Doe<br />
:<nowiki>{{GetUser|Yohn Doe}}</nowiki> results in <nowiki>{{#var|displayname}}</nowiki> = ?Yohn Doe? and <nowiki>{{#var|userpage}}</nowiki> = Unknown<br />
<br />
<includeonly><br />
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS --><br />
[[Category:Templates]]<br />
</includeonly></div>Jan Schoonderbeek