Set Session Expiration Time Manually-CodeIgniter

后端 未结 9 948
粉色の甜心
粉色の甜心 2021-01-01 10:23

How can I set session expiration time dynamically in codeigniter?

For example, if a user logs in and has the role of admin, the expiration time should b

9条回答
  •  攒了一身酷
    2021-01-01 10:55

    You can update your session expiration time by increasing this variable in config file:

    $config['sess_expiration'] = 'somevalue'.
    

    Set $config['sess_expiration'] = 0, if you want it to never expire.

    Here's a good discussion on CI forums:

    Dynamically set configuration on session expire doesn’t work

提交回复
热议问题