> ## 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.

# ejuser table

> This table contains entries for the users of the system.

## ejuser Table (299)

This table contains entries for the users of the system.

## Fields

| Name                          | Description                                                                                                             | Type                                      | Nullable |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- | :------: |
| id                            | The primary key (auto-incremented)                                                                                      | PK                                        |    No    |
| loginname                     | The unique loginname for this user.                                                                                     | String(63)                                |    No    |
| usergroup                     | The group this user is member of                                                                                        | FK [hierarchy](./hierarchy.mdx)           |    No    |
| username                      | The unique username for this user.                                                                                      | String(63)                                |    No    |
| password                      | The encrypted password for this user.                                                                                   | String(127)                               |    Yes   |
| firstname                     | The firstname for this user.                                                                                            | String(127)                               |    Yes   |
| middlename                    | The middlename for this user.                                                                                           | String(127)                               |    Yes   |
| lastname                      | The lastname for this user.                                                                                             | String(127)                               |    Yes   |
| email                         | The email address for this user.                                                                                        | String(255)                               |    No    |
| access\_level                 | The access level for this user.                                                                                         | Int                                       |    Yes   |
| status                        | The status (enum) for this user.                                                                                        | status                                    |    Yes   |
| signature                     | The users signature.                                                                                                    | Clob                                      |    Yes   |
| notify\_mask                  | A bitmask indicating to which extent the user should recieve pop-up warnings for various events.                        | Int                                       |    Yes   |
| email\_mask                   | A bitmask indicated to which extent the user should recieve email warnings for various events.                          | Int                                       |    Yes   |
| sms\_mask                     | A bitmask indicated to which extent the user should recieve sms warnings for various events.                            | Int                                       |    Yes   |
| language                      | A string indicating the user\&apos;s language (\&apos;no\&apos; or \&apos;en\&apos;).                                   | String(5)                                 |    Yes   |
| dictionary                    | A string indicating the user\&apos;s prefered dictionary language (\&apos;no\&apos; or \&apos;en\&apos;).               | String(5)                                 |    Yes   |
| default\_category             | The default category for this user when posting tickets and use\_last\_category is false.                               | FK [ej\_category](./ej-category.mdx)      |    No    |
| textareasize                  | Size of textarea for each user, example \&apos;80x40\&apos;                                                             | String(31)                                |    Yes   |
| flags                         | A bitmask indicating flags for this entry.                                                                              | Int                                       |    Yes   |
| last\_category                | The last chosen category for this user when posting tickets.                                                            | FK [ej\_category](./ej-category.mdx)      |    Yes   |
| profile\_id                   | Reference to the profile connected to this ejuser                                                                       | FK [profile](./profile.mdx)               |    Yes   |
| hidden\_bag\_bitset           | Each character represent a bit to set a HtmlBagHideable to default open or closed (1=open 0=closed)                     | String(255)                               |    Yes   |
| notify\_external\_lock        | A datetime lock to make sure notifications are only displayed by one notifcation system (ejournal or external programs) | DateTime                                  |    Yes   |
| notify\_external\_source      | A name (id) of the external notifications system (ejournal or external programs)                                        | String(255)                               |    Yes   |
| login\_attempts               | The number of times the user has attempted to login with the wrong password                                             | Int                                       |    Yes   |
| last\_login\_attempt          | The last time the user tried to log in without success                                                                  | DateTime                                  |    Yes   |
| idle\_time                    | Number of seconds the user has been idle. Updated by TrayIcon or simular external programs.                             | Int                                       |    No    |
| default\_user                 | The default user to set on new tickets in this category (1=automatically, 2=unasigned, 3=the owner                      | Int                                       |    Yes   |
| sms                           | The SMS number for this user                                                                                            | String(64)                                |    Yes   |
| new\_gui                      | Whether to use the new gui or not                                                                                       | Bool                                      |    No    |
| dbi\_agent\_id                | Integration agent (eJournal)                                                                                            | FK [dbi\_agent](./dbi-agent.mdx)          |    No    |
| dbi\_key                      | The primary key for the integrated entry in the external datasource.                                                    | String(255)                               |    No    |
| dbi\_last\_syncronized        | Last external syncronization.                                                                                           | DateTime                                  |    No    |
| dbi\_last\_modified           | When the entry was last modified.                                                                                       | DateTime                                  |    No    |
| minute\_offset                | Offset in hours between server and ejuser timezone.                                                                     | Int                                       |    No    |
| date\_format                  | The preferred format of dates and datetimes (enum) for this user.                                                       | date\_format                              |    No    |
| simultaneous\_login           | A boolean telling if the user is counted as one of the simultaneous ones, or one who alway may log in                   | Bool                                      |    No    |
| picture\_id                   | The attachment.id this reference is connected to.                                                                       | FK [attachment](./attachment.mdx)         |    Yes   |
| not\_present                  | Comment to add for user when status is not present.                                                                     | String(255)                               |    Yes   |
| default\_status\_new\_ticket  | Default status on new requests.                                                                                         | FK [ticket\_status](./ticket-status.mdx)  |    Yes   |
| default\_status\_add\_message | Default status on add message.                                                                                          | FK [ticket\_status](./ticket-status.mdx)  |    Yes   |
| num\_expanded\_messages       | The number of expanded messages in show-ticket view.                                                                    | Int                                       |    No    |
| date\_format\_string          | Chosen date format as a string for this user                                                                            | String(64)                                |    Yes   |
| time\_format\_string          | Chosen time format as a string for this user                                                                            | String(64)                                |    Yes   |
| date\_format\_long\_string    | Chosen date format for lists as a string for this user                                                                  | String(64)                                |    Yes   |
| chat\_status                  | Various chat statuses for an agent                                                                                      | Enum [ChatStatus](./enums/chatstatus.mdx) |    Yes   |

<img src="https://mintcdn.com/superofficeas/i6M2qZmvMNH7UTeu/media/loc/en/database/tables/ejuser.png?fit=max&auto=format&n=i6M2qZmvMNH7UTeu&q=85&s=748d48713d125d50a09a67e0f7dd1fa0" alt="ejuser table relationship diagram" width="764" height="635" data-path="media/loc/en/database/tables/ejuser.png" />

## Indexes

| Fields                        | Types       | Description |
| ----------------------------- | ----------- | ----------- |
| loginname                     | String(63)  | Index       |
| usergroup                     | FK          | Index       |
| username                      | String(63)  | Index       |
| email                         | String(255) | Index       |
| default\_category             | FK          | Index       |
| last\_category                | FK          | Index       |
| profile\_id                   | FK          | Index       |
| dbi\_agent\_id                | FK          | Index       |
| dbi\_key                      | String(255) | Index       |
| dbi\_last\_syncronized        | DateTime    | Index       |
| dbi\_last\_modified           | DateTime    | Index       |
| picture\_id                   | FK          | Index       |
| default\_status\_new\_ticket  | FK          | Index       |
| default\_status\_add\_message | FK          | Index       |

## Relationships

| Table                                         | Description                                                                                                                                                   |
| --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [associate](./associate)                      | Employees, resources and other users - except for External persons                                                                                            |
| [attachment](./attachment)                    | This table contains metadata for attachments. The actual attachments are stored directly on disk, with filenames based on the the primary key for this table. |
| [category\_membership](./category-membership) | This table connects users to categories (many-to-many).                                                                                                       |
| [chat\_message](./chat-message)               | This table contains messages in a chat session.                                                                                                               |
| [chat\_session](./chat-session)               | This table contains chat sessions.                                                                                                                            |
| [chat\_topic\_user](./chat-topic-user)        | This table connected the chat topics with the users (i.e. the membership).                                                                                    |
| [dbi\_agent](./dbi-agent)                     | DBI agent settings                                                                                                                                            |
| [dictionary](./dictionary)                    | User added dictionary words                                                                                                                                   |
| [doc\_document](./doc-document)               | This table contains documents.                                                                                                                                |
| [doc\_folder](./doc-folder)                   | A document folder.                                                                                                                                            |
| [ej\_category](./ej-category)                 | This table contains categories, in which tickets are categorized. The categories are organized in a hierarchial manner.                                       |
| [ej\_message](./ej-message)                   | This table contains the messages listed under tickets.                                                                                                        |
| [ejpackage](./ejpackage)                      | This table stores packages on the system.                                                                                                                     |
| [ejsel\_meta\_result](./ejsel-meta-result)    | This table stores result meta data                                                                                                                            |
| [ejselection](./ejselection)                  | This table stores selections, dynamic groups.                                                                                                                 |
| [element\_profile](./element-profile)         | The new (4.0) profile table. Contains profile for a single Html-element. Connected through element\_profile\_link                                             |
| [external\_document](./external-document)     | This table stores documents which can be viewed externaly, through the customer module                                                                        |
| [hierarchy](./hierarchy)                      | This table contains folders used to group the extra tables in the system.                                                                                     |
| [hotlist](./hotlist)                          | The table is used by the hotlist to store the relationship between tickets and users                                                                          |
| [kb\_category](./kb-category)                 | Knowledge base folder hierarchy                                                                                                                               |
| [kb\_category\_log](./kb-category-log)        | Who and when, if somebody edits a knowledge base folder                                                                                                       |
| [kb\_entry](./kb-entry)                       | This table contains FAQ entries.                                                                                                                              |
| [kb\_entry\_log](./kb-entry-log)              | Who and when, if somebody edits a knowledge base entry                                                                                                        |
| [kb\_workflow\_access](./kb-workflow-access)  | Control of who can do what in a knowledge base workflow step                                                                                                  |
| [login](./login)                              | This table contains entries for the user sessions.                                                                                                            |
| [ms\_filter](./ms-filter)                     | This table contains email filters. These are the filters allowing you to do advanced parsing of incomming emails.                                             |
| [notify](./notify)                            | This table contains the pop-up messages displayed for users for various events, such as \&apos;new ticket\&apos;, etc.                                        |
| [profile](./profile)                          | Deprecated. This table contains entries for the user profiles.                                                                                                |
| [reply\_template](./reply-template)           | Templates for automatic and manual replies to emails/sms organized hierachically                                                                              |
| [role\_member](./role-member)                 | Users linked to a role. Deprecated.                                                                                                                           |
| [s\_link](./s-link)                           | Links in messages to measure success rate of a campaign.                                                                                                      |
| [ticket](./ticket)                            | This table contains the tickets (requests) of the system. Its purpose should be evident.                                                                      |
| [ticket\_alert](./ticket-alert)               | This table will contain ticket escalation levels. A ticket will be escalated along a \&apos;chain\&apos; of these levels.                                     |
| [ticket\_log\_action](./ticket-log-action)    | This table contains actions for the tickets.                                                                                                                  |
| [ticket\_status](./ticket-status)             | This table user defined ticket status values.                                                                                                                 |
| [user\_attribute](./user-attribute)           | This table is used for storing various attributes for users.                                                                                                  |

## Replication Flags

* None

## Security Flags

* No access control via user's Role.


## Related topics

- [ejuser](/en/api/mdo-providers/reference/ejuser.md)
- [profile table](/en/database/tables/profile.md)
- [role_member table](/en/database/tables/role-member.md)
- [hotlist table](/en/database/tables/hotlist.md)
- [dictionary table](/en/database/tables/dictionary.md)
- [notify table](/en/database/tables/notify.md)
