Overview

Contains information about a website user.

The current user is available as a global user variable throughout the CMS. It is also available in most email and SMS templates and in fulfillment templates where it represents the user that created the order being fulfilled.

Properties

user.id

Returns the unique ID of the user.

user.is_anonymous

Returns true if the user is anonymous, otherwise returns false.

user.is_logged_in

The reverse of user.is_anonymous.

Note that this returns true if user is logged in as a guest user.

user.is_guest

Returns true if user is a guest user, otherwise returns false.

user.is_admin

Returns true if the user is an admin, otherwise returns false.

user.external_id

Returns the user's external_id, or nil if external_id is not set.

user.uid

Deprecated: use user.external_id instead.

user.email