Customers
Customers is a collection of users that can sign in to your website for accessing a history of purchases etc.
It is not mandatory to have a customer account in order to make purchases. If a customer registers an account after they have been making purchases as guests they will be able to access their purchase history if it has the same email address.
Entity Object
$customer = new ent_customer();
$customer->data['email'] = 'user@email.com';
$customer->data['firstname'] = 'John';
$customer->data['lastname'] = 'Doe';
$customer->save();
Reference Model
echo reference::customer(123)->firstname;
Database Query
$customer = database::query(
"select * from ". DB_TABLE_PREFIX ."customers
where id = ". (int)$customer_id ."
limit 1;"
)->fetch();