]> git.mxchange.org Git - friendica.git/blob - doc/database/db_user.md
Fixed wrong reference to user.expire in Model\User::getActorName
[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 | default-location         | Default for item.location                                                         | varchar(255)       | NO   |     |                     |                |
25 | allow_location           | 1 allows to display the location                                                  | boolean            | NO   |     | 0                   |                |
26 | theme                    | user theme preference                                                             | varchar(255)       | NO   |     |                     |                |
27 | pubkey                   | RSA public key 4096 bit                                                           | text               | YES  |     | NULL                |                |
28 | prvkey                   | RSA private key 4096 bit                                                          | text               | YES  |     | NULL                |                |
29 | spubkey                  |                                                                                   | text               | YES  |     | NULL                |                |
30 | sprvkey                  |                                                                                   | text               | YES  |     | NULL                |                |
31 | verified                 | user is verified through email                                                    | boolean            | NO   |     | 0                   |                |
32 | blocked                  | 1 for user is blocked                                                             | boolean            | NO   |     | 0                   |                |
33 | blockwall                | Prohibit contacts to post to the profile page of the user                         | boolean            | NO   |     | 0                   |                |
34 | hidewall                 | Hide profile details from unkown viewers                                          | boolean            | NO   |     | 0                   |                |
35 | blocktags                | Prohibit contacts to tag the post of this user                                    | boolean            | NO   |     | 0                   |                |
36 | unkmail                  | Permit unknown people to send private mails to this user                          | boolean            | NO   |     | 0                   |                |
37 | cntunkmail               |                                                                                   | int unsigned       | NO   |     | 10                  |                |
38 | notify-flags             | email notification options                                                        | smallint unsigned  | NO   |     | 65535               |                |
39 | page-flags               | page/profile type                                                                 | tinyint unsigned   | NO   |     | 0                   |                |
40 | account-type             |                                                                                   | tinyint unsigned   | NO   |     | 0                   |                |
41 | prvnets                  |                                                                                   | boolean            | NO   |     | 0                   |                |
42 | pwdreset                 | Password reset request token                                                      | varchar(255)       | YES  |     | NULL                |                |
43 | pwdreset_time            | Timestamp of the last password reset request                                      | datetime           | YES  |     | NULL                |                |
44 | maxreq                   |                                                                                   | int unsigned       | NO   |     | 10                  |                |
45 | expire                   | Delay in days before deleting user-related posts. Scope is controlled by pConfig. | int unsigned       | NO   |     | 0                   |                |
46 | account_removed          | if 1 the account is removed                                                       | boolean            | NO   |     | 0                   |                |
47 | account_expired          |                                                                                   | boolean            | NO   |     | 0                   |                |
48 | account_expires_on       | timestamp when account expires and will be deleted                                | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
49 | expire_notification_sent | timestamp of last warning of account expiration                                   | datetime           | NO   |     | 0001-01-01 00:00:00 |                |
50 | def_gid                  |                                                                                   | int unsigned       | NO   |     | 0                   |                |
51 | allow_cid                | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
52 | allow_gid                | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
53 | deny_cid                 | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
54 | deny_gid                 | default permission for this user                                                  | mediumtext         | YES  |     | NULL                |                |
55 | openidserver             |                                                                                   | text               | YES  |     | NULL                |                |
56
57 Indexes
58 ------------
59
60 | Name       | Fields       |
61 | ---------- | ------------ |
62 | PRIMARY    | uid          |
63 | nickname   | nickname(32) |
64 | parent-uid | parent-uid   |
65 | guid       | guid         |
66 | email      | email(64)    |
67
68 Foreign Keys
69 ------------
70
71 | Field | Target Table | Target Field |
72 |-------|--------------|--------------|
73 | parent-uid | [user](help/database/db_user) | uid |
74
75 Return to [database documentation](help/database)