main.php
'user'=>array(
// enable cookie-based authentication
'loginUrl'=>array('site/prijava'),
'allowAutoLogin'=>true,
),
ログインフォーム.php
if($this->_identity->errorCode===UserIdentity::ERROR_NONE)
{
$duration=$this->rememberMe ? 3600*24*30 : 0; // 30 days
Yii::app()->user->login($this->_identity,$duration);
return true;
}
このコードはデフォルトの yii アプリケーションから変更していません。「remember me」にチェックを入れてログインすると、ブラウザを閉じるときに再度ログインする必要があります。$duration を確認したところ、3600*24*30 に設定されています。同じ動作が Chrome と Mozzila にあり、Cookie が有効になっています。