使用Ion Auth,版本: 2.5.2,Codeigniter :3.1.0-dev
在我的本地组件上进行开发时,我希望将过期时间设置为长时间,而不是丢失会话,为此,在application/config/ion_auth.php中,我有:
$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中:
$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个小时内(或者更多一点)我失去了我的会话,并且不得不重新登录。我要设置哪些参数?它可以是一些服务器选项吗?
谢谢!
发布于 2016-06-22 20:55:47
从Ion Auth文档的Configuration Options部分,我得到了以下信息:
$config' user _expire‘-设置记住用户的时间,以秒为单位。默认值为'86500‘。
告诉我这是否有用..。干杯
https://stackoverflow.com/questions/37968193
复制相似问题