Documentation
User
The user plugin gives you access to user data and logic.
The user plugin's slug is user, so it can be used like so:
{pyro:user:function}
Functions
{pyro:user:logged_in}
Checks if a user is logged in or not. Can be used as a variable pair to display data only to logged in users, and a single tag to return TRUE or FALSE whether or not the user is logged in.
Attributes
| Name | Default | Required | Description |
|---|---|---|---|
| group | None | No | Group slug. Used to check if a user is not only logged in, but part of a particular group. |
Example:
{pyro:user:logged_in}
<p>This is just for logged in users.</p>
{/pyro:user:logged_in}
{pyro:user:not_logged_in}
Identical to the function above, but checks to see if a user is not logged in. Also takes the group parameter. Must be used as a tag pair.
Variables
The user plugin also gives you access to various user variables using the following syntax:
{pyro:user:variable}
Below is a table of available variables.
| Variable | Notes |
|---|---|
| id | |
| group_id | |
| ip_address | |
| active | 1 or 0. |
| activation_code | |
| created_on | Unix format. |
| last_login | Unix format. |
| username | |
| display_name | |
| forgotten_password_code | |
| remember_code | |
| group | Group slug. |
| group_description | Group name. |
| first_name | |
| last_name | |
| company | |
| phone | |
| lang | Language code (ie: "en" for English). |
| bio | |
| dob | Date of birth. Unix format. |
| gender | |
| mobile | |
| address_line1 | |
| address_line2 | |
| address_line3 | |
| postcode | |
| website | |
| msn_handle | |
| aim_handle | |
| yim_handle | |
| gtalk_handle | |
| gravatar |
