diff --git a/esi.module b/esi.module index 7d381cc..f103164 100755 --- a/esi.module +++ b/esi.module @@ -97,7 +97,7 @@ function esi_user($op, &$edit, &$account, $category = NULL) { if ($op == 'login') { require_once(dirname(__FILE__) . '/esi.inc'); $hash = _esi__get_roles_hash(array_keys($account->roles)); - $lifespan = min(variable_get('esi_seed_key_rotation_interval', ESI__DEFAULT_SEED_KEY_ROTATION_INTERVAL), ini_get('session.cookie_lifetime')); + $lifespan = max(variable_get('esi_seed_key_rotation_interval', ESI__DEFAULT_SEED_KEY_ROTATION_INTERVAL), ini_get('session.cookie_lifetime')); $cookie += array( 'value' => $hash, 'expire' => time() + $lifespan,