Skip to content

Latest commit

 

History

History
32 lines (25 loc) · 934 Bytes

data-model.md

File metadata and controls

32 lines (25 loc) · 934 Bytes

Data Model

When Yii2-user is installed the database is configured using the Yii2-user data model.

It can be useful to know what's going on in the database when Yii2-user is integrated your application.

Entity Relation Diagram

+----------------+ 1/n
| social_account <----------+
+----------------+          |
                          1 |
+-------+ 1/n         1 +---v----+
| token <--------------->  user  |
+-------+               +---^----+
                          1 |
+---------+ 1               |
| profile <-----------------+
+---------+

+------------+
| migrations |
+------------+

Explaining some basic tasks

  • Each user has exactely one Profile (./models/User.php afterSafe())
  • A token is generated if a user registers and Module::enableConfirmation is set to true (./models/User.php register()). Tokens are not deleted anymore.