T
T
Taras Labiak2014-10-05 19:39:20
PHP
Taras Labiak, 2014-10-05 19:39:20

How is uid related to entity_id in Profile2 in Drupal?

There is no direct relational relationship between the field_* tables and users. How is uid related to entity_id in Profile2 in Drupal? You need to check the values ​​of the user profile fields.
Actually I want to understand not only the API, but also how the data is stored.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikolay Shapovalov, 2014-12-22
@zniki_ru

The answer concerns Drupal 7.
If we talk about the Profile2 module, then the uid is stored there in the profile table, the uid column.
cgit.drupalcode.org/profile2/tree/profile2.install
And if the question is how the uid and entity_id are connected, then the connection occurs through the table of a specific entity.
For example, the node entity in the table node.uid
cgit.drupalcode.org/drupal/tree/modules/node/node....
In turn, user is also an entity.
Fields are bound to entities. Therefore, in the case of nodes field -> node -> uid.
You open a specific module and look at module.install, it usually describes the structure of tables in the schema api format.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question