User Session
The User Session is shared across the pages if a user is logged in.
This article describes what data is available to all in the User Session.
The Session ID should never be used in templates or disclosed to the public eye.
This is due to the security risk this poses to the user's session. Doing so could compromise a user's session's security, allowing access to their currently logged-in session and so any permissions that this includes.
Introduction
The goal of this page is to introduce what the sessions include.
Variables
Variable Name | Type | Description |
---|---|---|
$user | Array() | Contains most of information for the current logged User. |
$user.id | Integer | ID used to identify a User. |
$user.firstname | String | The First Name of the User currently logged into the site. |
$user.title | String | Title of the User. Example: 'Mr' |
$user.lastname | String | The Last Name of the User currently logged into the site. |
$user.company | String | The company of the User if this is specified. |
$user.date_created | Datetime | The Date of when the User was created. |
$user.date_modified | Datetime | The Date of when the User was modified. |
$user.date_login | Datetime | The Users last login. |
$user.user_cookie | String | The Users unique basket cookie value. |
$user.user_session | String | |
$user.user_ip | String | The Users current IP address. |
$user.forgot_password_key | String | The Users forgotten password key, used when building links to the forgotten password page. |
$user.email_address | String | The Users current email address. |
$user.verified_email_address | String | Email address that has been verified by the User, using the Email Verification process. More about the verification process can be found here. |
$user.failed_login_attempts | Integer | Failed login attempts. |
$user.active | Integer | If the User is active, this will contain 1. |
$user.loyalty_approved | Integer | Whether the User can use Loyalty Points or not. |
$user.user_type | Integer | Whether the User is an admin or not. Example: 0 not / 1 admin |
$user.idle_timeout | Integer | Time out of the User. |
$user.dob | Datetime | Users Date of Birth. |
$user.photo | BLOB | Image of Users upload. |
$user.loyalty_points | Integer | The number of Loyalty Points the User currently logged into the site has used to date. |
$user.used_loyalty_points | Integer | The number of Loyalty Points the User currently logged into the site has used to date. |
$user.user_discount | Float | If the User receives a discount on orders, i.e. > 0 = has a discount. |
$user.user_discount_type | String | The User discount type can be 'value','percent'. |
$user.user_location | Integer | The Users location. |
$user.fields | Array() | Contains list of the fields and values form the User Additional Fields tables. |
$user.group_ids | Array() | Contains all internal ID used to identify the groups. |
$user.group_names | Array() | Contains all names of the groups. |
$user.newsletter_opt_in | Boolean | Indicates whether the current User is signed-up to the standard Aurora Newsletter mailing list. |
$user.post_code | String | User shipping address if it is not available will present delivery address. |
Updated over 2 years ago