yii\web\User::renewIdentityCookie PHP Method

renewIdentityCookie() protected method

This method will set the expiration time of the identity cookie to be the current time plus the originally specified cookie duration.
protected renewIdentityCookie ( )
    protected function renewIdentityCookie()
    {
        $name = $this->identityCookie['name'];
        $value = Yii::$app->getRequest()->getCookies()->getValue($name);
        if ($value !== null) {
            $data = json_decode($value, true);
            if (is_array($data) && isset($data[2])) {
                $cookie = new Cookie($this->identityCookie);
                $cookie->value = $value;
                $cookie->expire = time() + (int) $data[2];
                Yii::$app->getResponse()->getCookies()->add($cookie);
            }
        }
    }