> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# login table

> This table contains entries for the user sessions.

## login Table (297)

This table contains entries for the user sessions.

## Fields

| Name                 | Description                                                                                                          | Type                                      | Nullable |
| -------------------- | -------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | :------: |
| id                   | The primary key (auto-incremented)                                                                                   | PK                                        |    No    |
| user\_id             | The id of the user this entry references.                                                                            | FK [ejuser](./ejuser.mdx)                 |    No    |
| session\_key         | A random 32 characters value used as authentication key for the session.                                             | String(32)                                |    No    |
| remote\_addr         | The IP address of the client for this session.                                                                       | String(64)                                |    Yes   |
| remote\_host         | The hostname (depending on whether reverse lookup is enabled in httpd) or IP address of the client for this session. | String(64)                                |    Yes   |
| logged\_in           | When this session started.                                                                                           | DateTime                                  |    Yes   |
| idle                 | The last time this session was active.                                                                               | DateTime                                  |    Yes   |
| status               | The status (enum) for this session.                                                                                  | Int                                       |    No    |
| origin               | 1=soap call, 2=web pages                                                                                             | Int                                       |    No    |
| error\_message       | Stores the last error message recorded on this session                                                               | String(255)                               |    Yes   |
| authentication\_type | The authentication type (enum) for this session.                                                                     | authentication\_type                      |    Yes   |
| active\_menu         | The currently active (open) left-menu for this session.                                                              | Int                                       |    Yes   |
| ns\_secret           | Netserver login secret.                                                                                              | String(2000)                              |    Yes   |
| flags                | Bitmask of flags for a service login session                                                                         | Enum [LoginFlags](./enums/loginflags.mdx) |    Yes   |

<img src="https://mintcdn.com/superofficeas-bugfix-ty-screen-designer-paradox/bBv7ep-d5A4oaYwj/media/loc/en/database/tables/login.png?fit=max&auto=format&n=bBv7ep-d5A4oaYwj&q=85&s=66717c6a6944ef4189b5fadea3248b73" alt="login table relationship diagram" width="904" height="811" data-path="media/loc/en/database/tables/login.png" />

## Indexes

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

## Relationships

| Table                                          | Description                                                                                                                                    |
| ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| [ejuser](./ejuser)                             | This table contains entries for the users of the system.                                                                                       |
| [extra\_tables\_result](./extra-tables-result) | Result set of executed search in ejournal extra tables                                                                                         |
| [invoice\_sum](./invoice-sum)                  | This table is used temporarily when listing invoice statistics. It is used because we need to sort balances from both customers and companies. |
| [session\_object](./session-object)            | Generic session object, accessible from ejscript etc, typically xml or name=value syntax, may be stored over several rows if big               |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.
