I've been trying to implement a "remember me" option to my login screen for the last hours, with no success. Can someone give me a little help? =D
I'm using cakephp 2.3.9 in a apache2/mysql 5.5/ubuntu 12.10 server. In "login()" method, inside my users controller, I've added the code:
if ($this->Auth->login()) {
if($this->request->data('Usuario.remember')==="1"){
CakeSession::write('Session.timeout', '144000');//100 dias
}
return $this->redirect($this->Auth->redirect());
}
I was hoping it would make that particular user session bigger than usual, but it seems that it was applied to all users. I'm using cakephp's default auth component. Can someone show me what I'm doing wrong and what should I do? Thanks in advance ;]