T
T
teodor7teodor72017-08-05 15:55:57
Yii
teodor7teodor7, 2017-08-05 15:55:57

How to use profile in Yii2::$app using dektrium/yii2-user?

There is a desire to use dektrium/yii2-user and if Yii2::$app->user we get user data from the user table. How to do the same for profile only, so that Yii2::$app->profile or Yii2::$app->user->profile get data from the profile table.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2017-08-05
@teodor7teodor7

Try this
Yii::$app->user->identity->profile

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question