]> git.mxchange.org Git - friendica.git/blob - doc/database/db_user.md
New field to show the day of the last activity
[friendica.git] / doc / database / db_user.md
1 Table user
2 ===========
3
4 The local users
5
6 Fields
7 ------
8
9 | Field                    | Description                                                                       | Type               | Null | Key | Default             | Extra          |
10 | ------------------------ | --------------------------------------------------------------------------------- | ------------------ | ---- | --- | ------------------- | -------------- |
11 | uid                      | sequential ID                                                                     | mediumint unsigned | NO   | PRI | NULL                | auto_increment |
12 | parent-uid               | The parent user that has full control about this user                             | mediumint unsigned | YES  |     | NULL                |                |
13 | guid                     | A unique identifier for this user                                                 | varchar(64)        | NO   |     |                     |                |
14 | username                 | Name that this user is known by                                                   | varchar(255)       | NO   |     |                     |                |
15 | password                 | encrypted password                                                                | varchar(255)       | NO   |     |                     |                |
16 | legacy_password          | Is the password hash double-hashed?                                               | boolean            | NO   |     | 0                   |                |
17 | nickname                 | nick- and user name                                                               | varchar(255)       | NO   |     |                     |                |
18 | email                    | the users email address                                                           | varchar(255)       | NO   |     |                     |                |
19 | openid                   |                                                                                   | varchar(255)       | NO   |     |                     |                |
20 | timezone                 | PHP-legal timezone                                                                | varchar(128)       | NO   |     |                     |                |
21 | language                 | default language                                                                  | varchar(32)        | NO   |     | en                  |                |
22 | register_date            | timestamp of registration                                                         | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
23 | login_date               | timestamp of last login                                                           | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
24 | last-activity            | Day of the last activity                                                          | date               | YES  |     | NULL                |                |
25 | default-location         | Default for item.location                                                         | varchar(255)       | NO   |     |                     |                |
26 | allow_location           | 1 allows to display the location                                                  | boolean            | NO   |     | 0                   |                |
27 | theme                    | user theme preference                                                             | varchar(255)       | NO   |     |                     |                |
28 | pubkey                   | RSA public key 4096 bit                                                           | text               | YES  |     | NULL                |                |
29 | prvkey                   | RSA private key 4096 bit                                                          | text               | YES  |     | NULL                |                |
30 | spubkey                  |                                                                                   | text               | YES  |     | NULL                |                |
31 | sprvkey                  |                                                                                   | text               | YES  |     | NULL                |                |
32 | verified                 | user is verified through email                                                    | boolean            | NO   |     | 0                   |                |
33 | blocked                  | 1 for user is blocked                                                             | boolean            | NO   |     | 0                   |                |
34 | blockwall                | Prohibit contacts to post to the profile page of the user                         | boolean            | NO   |     | 0                   |                |
35 | hidewall                 | Hide profile details from unkown viewers                                          | boolean            | NO   |     | 0                   |                |
36 | blocktags                | Prohibit contacts to tag the post of this user                                    | boolean            | NO   |     | 0                   |                |
37 | unkmail                  | Permit unknown people to send private mails to this user                          | boolean            | NO   |     | 0                   |                |
38 | cntunkmail               |                                                                                   | int unsigned       | NO   |     | 10                  |                |
39 | notify-flags             | email notification options                                                        | smallint unsigned  | NO   |     | 65535               |                |
40 | page-flags               | page/profile type                                                                 | tinyint unsigned   | NO   |     | 0                   |                |
41 | account-type             |                                                                                   | tinyint unsigned   | NO   |     | 0                   |                |
42 | prvnets                  |                                                                                   | boolean            | NO   |     | 0                   |                |
43 | pwdreset                 | Password reset request token                                                      | varchar(255)       | YES  |     | NULL                |                |
44 | pwdreset_time            | Timestamp of the last password reset request                                      | datetime           | YES  |     | NULL                |                |
45 | maxreq                   |                                                                                   | int unsigned       | NO   |     | 10                  |                |
46 | expire                   | Delay in days before deleting user-related posts. Scope is controlled by pConfig. | int unsigned       | NO   |     | 0                   |                |
47 | account_removed          | if 1 the account is removed                                                       | boolean            | NO   |     | 0                   |                |
48 | account_expired          |                                                                                   | boolean            | NO   |     | 0                   |                |
49 | account_expires_on       | timestamp when account expires and will be deleted                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
50 | expire_notification_sent | timestamp of last warning of account expiration                                   | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
51 | def_gid                  |                                                                                   | int unsigned       | NO   |     | 0                   |                |
52 | allow_cid                | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
53 | allow_gid                | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
54 | deny_cid                 | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
55 | deny_gid                 | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
56 | openidserver             |                                                                                   | text               | YES  |     | NULL                |                |
57
58 Indexes
59 ------------
60
61 | Name       | Fields       |
62 | ---------- | ------------ |
63 | PRIMARY    | uid          |
64 | nickname   | nickname(32) |
65 | parent-uid | parent-uid   |
66 | guid       | guid         |
67 | email      | email(64)    |
68
69 Foreign Keys
70 ------------
71
72 | Field | Target Table | Target Field |
73 |-------|--------------|--------------|
74 | parent-uid | [user](help/database/db_user) | uid |
75
76 Return to [database documentation](help/database)