> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# login_customer table

> This table contains entries for customer sessions. At first only used for Soap logins, but will later also be used for web logins

## login\_customer Table (298)

This table contains entries for customer sessions. At first only used for Soap logins, but will later also be used for web logins

## Fields

| Name              | Description                                                                                                                          | Type                      | Nullable |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------- | :------: |
| id                | The primary key (auto-incremented)                                                                                                   | PK                        |    No    |
| customer\_id      | The id of the customer this entry references.                                                                                        | FK [person](./person.mdx) |    No    |
| session\_key      | A random 32 characters value used as authentication key for the session.                                                             | String(32)                |    No    |
| expire            | The last time this session was active.                                                                                               | DateTime                  |    Yes   |
| seconds\_to\_live | The session key will expire after a given number of seconds.                                                                         | Int                       |    No    |
| remote\_addr      | For future use: The IP address of the client for this session.                                                                       | String(64)                |    Yes   |
| remote\_host      | For future use: The hostname (depending on whether reverse lookup is enabled in httpd) or IP address of the client for this session. | String(64)                |    Yes   |
| error\_message    | Stores the last error message recorded on this session                                                                               | String(255)               |    Yes   |
| origin            | 1=soap call, 2=customer pages                                                                                                        | Int                       |    No    |
| created\_at       | When the entry was created                                                                                                           | DateTime                  |    Yes   |

<img src="https://mintcdn.com/superofficeas/6OcOTPa_ISkjXJg4/media/loc/en/database/tables/login_customer.png?fit=max&auto=format&n=6OcOTPa_ISkjXJg4&q=85&s=cb80455da2f2887953b1f4d7efe3ae26" alt="login_customer table relationship diagram" width="414" height="59" data-path="media/loc/en/database/tables/login_customer.png" />

## Indexes

| Fields       | Types      | Description |
| ------------ | ---------- | ----------- |
| customer\_id | FK         | Index       |
| session\_key | String(32) | Index       |
| origin       | Int        | Index       |

## Relationships

| Table              | Description |
| ------------------ | ----------- |
| [person](./person) | Persons     |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [login table](/en/database/tables/login.md)
- [ticket_customers table](/en/database/tables/ticket-customers.md)
- [message_customers table](/en/database/tables/message-customers.md)
- [Protected tables](/en/api/bulk-operations/mass-operations/protected-tables.md)
- [person table](/en/database/tables/person.md)
- [Customer](/en/automation/crmscript/reference/CRMScript.Native.Customer.md)
