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