首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Ion Auth、Codeigniter 3.1下不丢失会话

在Ion Auth、Codeigniter 3.1下不丢失会话
EN

Stack Overflow用户
提问于 2016-06-22 20:35:43
回答 1查看 1.3K关注 0票数 2

使用Ion Auth,版本: 2.5.2,Codeigniter :3.1.0-dev

在我的本地组件上进行开发时,我希望将过期时间设置为长时间,而不是丢失会话,为此,在application/config/ion_auth.php中,我有:

代码语言:javascript
复制
$config['hash_method']    = 'bcrypt';   // sha1 or bcrypt,  bcrypt is STRONGLY recommended
$config['default_rounds'] = 8;      // This does not apply if random_rounds is set to true
$config['random_rounds']  = FALSE;
$config['min_rounds']     = 5;
$config['max_rounds']     = 9;
$config['salt_prefix']    = '$2y$';

$config['default_group']              = 'Members';           // Default group, use name
$config['admin_group']                = 'Admin';             // Default administrators group, use name
$config['identity']                   = 'email';             // A database column which is used to login with
$config['min_password_length']        = 6;                   // Minimum Required Length of Password
$config['max_password_length']        = 20;                  // Maximum Allowed Length of Password
$config['email_activation']           = FALSE;               // Email Activation for registration
$config['manual_activation']          = FALSE;               // Manual Activation for registration
$config['remember_users']             = TRUE;                // Allow users to be remembered and enable auto-login
//$config['user_expire']                = 986500;               // How long to remember the user (seconds). Set to zero for no expiration
$config['user_expire']                = 0;               // I HOPE no expiration
$config['user_extend_on_login']       = TRUE;               // Extend the users cookies every time they auto-login
$config['track_login_attempts']       = FALSE;               // Track the number of failed login attempts for each user or ip.
$config['track_login_ip_address']     = TRUE;                // Track login attempts by IP Address, if FALSE will track based on identity. (Default: TRUE)
$config['maximum_login_attempts']     = 3;                   // The maximum number of failed login attempts.
$config['lockout_time']               = 600;                 // The number of seconds to lockout an account due to exceeded attempts
$config['forgot_password_expiration'] = 0;                   // The number of milliseconds after which a forgot password request will expire. If 

在我的应用程序/config/config.php中:

代码语言:javascript
复制
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 9997200; // long period of time
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 990000; // long period of time
$config['sess_regenerate_destroy'] = FALSE;

但是不管怎样,在1个小时内(或者更多一点)我失去了我的会话,并且不得不重新登录。我要设置哪些参数?它可以是一些服务器选项吗?

谢谢!

EN

回答 1

Stack Overflow用户

发布于 2016-06-22 20:55:47

从Ion Auth文档的Configuration Options部分,我得到了以下信息:

$config' user _expire‘-设置记住用户的时间,以秒为单位。默认值为'86500‘。

告诉我这是否有用..。干杯

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37968193

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档