Why yii2 touches the User model?

This is the address(from the bottom up it is called)
<item>
#0 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Object.php(107): yii\web\User->init()
</item>
<item>
#1 [internal function]: yii\base\Object->__construct(Array)
</item>
<item>
#2 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\di\Container.php(368): ReflectionClass->newInstanceArgs(Array)
</item>
<item>
#3 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\di\Container.php(153): yii\di\Container->build('yii\\web\\User', Array, Array)
</item>
<item>
#4 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\BaseYii.php(344): yii\di\Container->get('yii\\web\\User', Array, Array)
</item>
<item>
#5 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\di\ServiceLocator.php(133): yii\BaseYii::createObject(Array)
</item>
<item>
#6 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\web\Application.php(168): yii\di\ServiceLocator->get('user')
</item>
<item>
#7 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\filters\RateLimiter.php(70): yii\web\Application->getUser()
</item>
<item>
#8 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\ActionFilter.php(73): yii\filters\RateLimiter->beforeAction(Object(yii\rest\IndexAction))
</item>
<item>
#9 [internal function]: yii\base\ActionFilter->beforeFilter(Object(yii\base\ActionEvent))
</item>
<item>
#10 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Component.php(541): call_user_func(Array, Object(yii\base\ActionEvent))
</item>
<item>
#11 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Controller.php(269): yii\base\Component->trigger('beforeAction', Object(yii\base\ActionEvent))
</item>
<item>
#12 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\web\Controller.php(108): yii\base\Controller->beforeAction(Object(yii\rest\IndexAction))
</item>
<item>
#13 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Controller.php(152): yii\web\Controller->beforeAction(Object(yii\rest\IndexAction))
</item>
<item>
#14 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Module.php(454): yii\base\Controller->runAction(", Array)
</item>
<item>
#15 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\web\Application.php(84): yii\base\Module->runAction('apartments/test', Array)
</item>
<item>
#16 C:\OpenServer\domains\aparts\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request))
</item>
<item>
#17 C:\OpenServer\domains\aparts\aparts\index.php(8): yii\base\Application->run()
</item>

Although in the settings I have not spelled out any connectivity of users. This is my first use ActiveController-a by the way and I don't know what to do with it.
July 8th 19 at 11:39
3 answers
July 8th 19 at 11:41
Solution
found the answer: ActiveController before you answer a particular query checks whether this user has right this action. And the rights of the users I had a is undefined, exactly as the class of the user. This problem I decided to just overload the function beforeAction () that verifies this case.
July 8th 19 at 11:43
There are by default, migrate, expand it. Out of the box is the same model users.
July 8th 19 at 11:45
#9 [internal function]: yii\base\ActionFilter->beforeFilter(Object(yii\base\ActionEvent))

You need to watch that in the parent controller.

Find more questions by tags Yii