Bug in restapi while module to RateLimiter

vendor\yiisoft\yii2\filters\RateLimiter.php
public function beforeAction($action)

{

    if ($this->user === null && Yii::$app->getUser()) {

        $this->user = Yii::$app->getUser()->getIdentity(false);

    } else {

        $this->user = $this->user->getIdentity(false); // this

    }

So… what’s the issue?