Confirmed users
358
edits
No edit summary |
No edit summary |
||
| Line 11: | Line 11: | ||
= Data Model = | = Data Model = | ||
Every user of a services app has | Every user of a services app has the following unique identifiers: | ||
* an email address by which they identify themselves, and | |||
* a username, formed by taking the sha1 hash of the email address, and | |||
* a numeric userid by which they are identified in persistent storage. | |||
The email address may be mutable and is selected by the user; the userid is immutable and is generated automatically. | |||
In code, the user is represented by a dict of their user data. It will always include the keys "username" and "userid". Applications may also arrange for other keys to be loaded into this dict. | In code, the user is represented by a dict of their user data. It will always include the keys "username" and "userid". Applications may also arrange for other keys to be loaded into this dict. | ||