开发者

"Remember Me" Feature with CodeIgniter's FreakAuth Library

开发者 https://www.devze.com 2023-01-03 02:41 出处:网络
Has any开发者_如何学运维body been able to implement a \"remember me\" feature with CodeIgniter\'s FreakAuth Library?I don\'t use freakauth, I just do those things in my own custom library. However, I

Has any开发者_如何学运维body been able to implement a "remember me" feature with CodeIgniter's FreakAuth Library?


I don't use freakauth, I just do those things in my own custom library. However, I needed this feature and was having troubles getting something to work until someone pointed me here:

http://codeigniter.com/wiki/PK_Session/

It works great for me. I would guess it works with the freakauth library too. Basically, in your controller you see if remember me was checked, then you call:

$this->session->cookie_monster($this->input->post('remember_me') ? FALSE : TRUE);

It then can set another cookie that stores if the other should be remembered.

There's more to it, but just read through the code to get an idea of how it works.


I currently use the library TankAuth and that has a "Remember me" function in it. You could use that or implement the way they do it in FreakAuth.

http://www.konyukhov.com/soft/tank_auth/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号