Spree::User
(which is provided by the Auth Devise extension).
You should however reference Users with an universal Spree.user_class
to avoid any potential issues, eg.
Spree::User
model:
Attribute | Description | Example Value |
---|---|---|
email | The email address of the user. | user@example.com |
ship_address_id | References the default shipping address associated with the user. | 2 |
bill_address_id | References the default billing address associated with the user. | 3 |
admin
(which will grant them access to the Spree admin).
To attach a role to a user, you can use this code:
Spree::User
includes several ActiveRecord concerns, which provide additional methods for the user model.
Some handy methods are listed below:
Spree::BaseController
, you can access the current user with spree_current_user
method.