Difference between revisions of "Template:GetUserData"

From Pathfinder Wiki
(Created page with "<includeonly>{{#dpl:title={{{user|User:{{CURRENTUSER}}}}}/Profile|include={UserProfile}:{{{data}}}}}</includeonly><noinclude> Fetches profile data from the UserProfile templat...")
 
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#dpl:title={{{user|User:{{CURRENTUSER}}}}}/Profile|include={UserProfile}:{{{data}}}}}</includeonly><noinclude>
+
<includeonly>{{#vardefine:data|{{#dpl:title=User:{{{user|{{#username: }}}}}/Profile|debug=0|include={UserProfile}:{{{data|Division}}}}}}}{{#if:{{#var:data}}|{{#var:data}}|{{{alt|}}}}}</includeonly><noinclude>
 
Fetches profile data from the UserProfile template on the user's User:''username''/Profile page.
 
Fetches profile data from the UserProfile template on the user's User:''username''/Profile page.
  
 +
If no user argument is specified, it assumes the current user.  If the current user is anonymous, it returns an empty string.
 +
 +
If the alt parameter is supplied, it will be returned instead of an empty string (if it would have returned an empty string).
 +
 +
The ''data'' argument specifies an argument in the UserProfile template on the user's profile page.
 +
 +
The current logged in user's username is: {{#username:no user logged in}}
 
==Example==
 
==Example==
<nowiki>{{</nowiki>GetUserData|data=Division}} &rarr; {{GetUserData|Division}}
+
<nowiki>{{</nowiki>GetUserData|data=State|alt=none}} &rarr; {{GetUserData|data=State|alt=none}}
<nowiki>{{</nowiki>GetUserData|user=Jomegat bot|data=Division}} &rarr; {{GetUserData|Division}}
+
 
 +
<nowiki>{{</nowiki>GetUserData}} &rarr; {{GetUserData}}
 +
 
 +
<nowiki>{{</nowiki>GetUserData|data=Union}} &rarr; {{GetUserData|data=Union}}
 +
 
 +
<nowiki>{{</nowiki>GetUserData|user=Jomegat|data=Union}} &rarr; {{GetUserData|user=Jomegat|data=Union}}
 +
 
 +
<nowiki>{{</nowiki>GetUserData|user=Jomegat|data=Club}} &rarr; {{GetUserData|user=Jomegat|data=Club}}
 +
 
 +
<nowiki>{{</nowiki>GetUserData|user=Jomegat|data=Criminal Record}} &rarr; {{GetUserData|user=Jomegat|data=Criminal Record}}
 +
 
 +
<nowiki>{{</nowiki>GetUserData|user=DesignerThan|data=Criminal Record}} &rarr; {{GetUserData|user=DesignerThan|data=Criminal Record}}
 +
 
 +
 
 
</noinclude>
 
</noinclude>

Latest revision as of 23:59, 27 July 2021

Fetches profile data from the UserProfile template on the user's User:username/Profile page.

If no user argument is specified, it assumes the current user. If the current user is anonymous, it returns an empty string.

If the alt parameter is supplied, it will be returned instead of an empty string (if it would have returned an empty string).

The data argument specifies an argument in the UserProfile template on the user's profile page.

The current logged in user's username is: no user logged in

Example

{{GetUserData|data=State|alt=none}} → none

{{GetUserData}} →

{{GetUserData|data=Union}} →

{{GetUserData|user=Jomegat|data=Union}} → Atlantic Union

{{GetUserData|user=Jomegat|data=Club}} → Merrimack Valley

{{GetUserData|user=Jomegat|data=Criminal Record}} → Clean

{{GetUserData|user=DesignerThan|data=Criminal Record}} →