An unprefixed data tag refers to the user in the current result row:
{user username="editor"}[name]{/user}
Currently Logged-in User
The current: prefix is available in Free and Pro. It reads data from the currently logged-in visitor, even when the outer tag selected somebody else:
{user username="editor"}
Selected user: [name]
Visitor: [current:name]
{/user}
You can combine current: with supported data groups, for example [current:id], [current:profile:city], and [current:contact:position].
Multiple-user Result Selectors PRO
The following selectors require a Pro multiple-user result:
| Syntax | Description |
|---|---|
row:... | Data from the current result row. |
previous:... | Data from the previous row, or an empty value on the first row. |
next:... | Data from the next row, or an empty value on the last row. |
first:... | Data from the first row in the result. |
last:... | Data from the last row in the result. |
1:..., 2:..., etc. | Data from the result row with that count number. |
Append any supported user data selector after the row prefix:
{users username="abigail,bcarter,clara" ordering="username"}
{if is-first}
First: [1:name]
Second: [2:name]
Last position: [last:contact:position]
{/if}
{/users}
Relative selectors can compare adjacent rows. This example starts a new heading whenever the contact position changes:
{users usergroup="Staff" ordering="contact:position, name"}
{if contact:position != previous:contact:position}
<h2>[contact:position]</h2>
{/if}
<p>[name]</p>
{/users}
Use current: for the logged-in visitor and row: for the current multiple-user result. Users Anywhere does not provide article-oriented this:, author, modifier, title, alias, or category selectors.