【问题标题】:tank auth logouts unexpectedly坦克身份验证意外注销
【发布时间】:2013-07-16 16:00:05
【问题描述】:

我正在为我的项目使用 tank auth,但在工作期间会话意外到期。

    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 引导框架

【问题讨论】:

  • 这是什么浏览器?
  • 铬。我想我可以工作几分钟,但时间很不均衡,随时都会退出。
  • 您是否将会话存储在数据库中?
  • 是的,我将它存储在数据库中

标签: php codeigniter session codeigniter-2 tankauth


【解决方案1】:

我在使用 Tank Auth 和 CodeIgniter 2.1 时遇到了类似的问题。

你可以在这里找到详细的解释和解决方案

http://www.hiretheworld.com/blog/tech-blog/codeigniter-session-race-conditions

这些链接还可以帮助您: http://ellislab.com/forums/viewthread/199753/#962141

http://ellislab.com/forums/viewthread/203821/#951378

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-05-25
    • 2011-06-03
    • 2010-11-07
    • 2021-10-08
    • 1970-01-01
    相关资源
    最近更新 更多