How to change session cookie value in CakePHP

In my Cakephp application, I have a session cookie named "my_cookie" and it contains some random value "QSD5111AS552DNJK".

I noticed that the value is the same for the cookie (before logging in and after logging in). If I want to change the cookie value after logging in, what are the steps that I must follow. And my code in core.php file

Configure::write('Session', array(

    'defaults' => 'php',

    'cookie' => 'my_cookie',

    'timeout' => 4000 

));

Please help me in this matter for more clarification.

+4
source share
1 answer

, , , , CakePHP . , , .

, ,

$this->Session->renew();

CakeSession

App::uses('CakeSession', 'Model/Datasource');
CakeSession::renew();
+3

All Articles