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 NameTypeDescription
$userArray()Contains most of information for the current logged User.
$user.idIntegerID used to identify a User.
$user.firstnameStringThe First Name of the User currently logged into the site.
$user.titleStringTitle of the User. Example: 'Mr'
$user.lastnameStringThe Last Name of the User currently logged into the site.
$user.companyStringThe company of the User if this is specified.
$user.date_createdDatetimeThe Date of when the User was created.
$user.date_modifiedDatetimeThe Date of when the User was modified.
$user.date_loginDatetimeThe Users last login.
$user.user_cookieStringThe Users unique basket cookie value.
$user.user_sessionString
$user.user_ipStringThe Users current IP address.
$user.forgot_password_keyStringThe Users forgotten password key, used when building links to the forgotten password page.
$user.email_addressStringThe Users current email address.
$user.verified_email_addressStringEmail 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_attemptsIntegerFailed login attempts.
$user.activeIntegerIf the User is active, this will contain 1.
$user.loyalty_approvedIntegerWhether the User can use Loyalty Points or not.
$user.user_typeIntegerWhether the User is an admin or not. Example: 0 not / 1 admin
$user.idle_timeoutIntegerTime out of the User.
$user.dobDatetimeUsers Date of Birth.
$user.photoBLOBImage of Users upload.
$user.loyalty_pointsIntegerThe number of Loyalty Points the User currently logged into the site has used to date.
$user.used_loyalty_pointsIntegerThe number of Loyalty Points the User currently logged into the site has used to date.
$user.user_discountFloatIf the User receives a discount on orders, i.e. > 0 = has a discount.
$user.user_discount_typeStringThe User discount type can be 'value','percent'.
$user.user_locationIntegerThe Users location.
$user.fieldsArray()Contains list of the fields and values form the User Additional Fields tables.
$user.group_idsArray()Contains all internal ID used to identify the groups.
$user.group_namesArray()Contains all names of the groups.
$user.newsletter_opt_inBooleanIndicates whether the current User is signed-up to the standard Aurora Newsletter mailing list.
$user.post_codeStringUser shipping address if it is not available will present delivery address.