My website is a gadget application. It uses CakePHP framework. It has the below snippet in AppController::beforeFilter(). I searched the cookie variable in the project but can’t find any other occurences. I also don’t understand what it works. Why does it always check this in every request.
if ( isset( $_COOKIE[session_name()] ) ) {
if ( !isset( $this->sns_id ) ) {
// セッション期限切れ
$this->cakeError( 'session' );
}
}
else {
// スタートページからの遷移でなかったら
if ( !isset( $_REQUEST['post_pf_params'] ) ) {
$this->cakeError( 'cookie' );
}
}
From CakePHP api,
So Here is what it does,
From google translation,
セッション期限切れ means Session expired.
スタートページからの遷移でなかったら means If you are not a transition from the Start Page