1

プロジェクトにタンク認証を使用していますが、作業中にセッションが予期せず期限切れになります。

    public function __construct()
{
    parent:: __construct();


    $this->load->model("stulib");

    $this->load->library("Gen");
    $this->load->model('tank_auth/users','users');
    $this->load->library('tank_auth');
    $this->title='Angel';
    $this->user_id=$this->tank_auth->get_user_id();
    $this->school_id=$this->users->get_school();
    $this->school_name=$this->users->get_school_name($this->school_id);
    $this->yesterday=$this->studentlib->yesterday();

    if(!$this->tank_auth->is_logged_in())
      die("No access rio!");

}

それが私のコントローラーです。コントローラーのコンストラクターでのみ is_logged_in をチェックします。

編集:

  • セッションをデータベースに保存しています
  • 私はajaxリクエストを使用していません
  • Twitterのブートストラップフレームワークを使用しています
4

1 に答える 1