我正在使用Magento 2.4.6,并希望允许客户永久登录,只要我不点击注销按钮。

huangapple go评论65阅读模式
英文:

I'm using Magento 2.4.6 and want to allow customers to log in permanently as long as I don't hit the logout button

问题

我正在尝试在Magento 2.4.6中实现客户登录时长为2天或(一段时间)。我尝试调整“在线会话生命周期”值以控制Magento 2.4.6中客户会话的持续时间,但它没有起作用!

如您在图像中所见,我尝试更改默认值,但没有起作用:

我正在使用Magento 2.4.6,并希望允许客户永久登录,只要我不点击注销按钮。

英文:

I am trying to achieve a login duration of 2 days or (a period of time) for customers in Magento 2.4.6. I tried adjusting the "Online Session Lifetime" value to control the duration of customer sessions in Magento 2.4.6 but it's not working!

as you can see in the image i tried to change the default value but it didn't work :

我正在使用Magento 2.4.6,并希望允许客户永久登录,只要我不点击注销按钮。

答案1

得分: 1

一种实现这个的方法是检查并可能调整 php.ini 配置文件。

这里有两个设置:

  1. 'session.gc_maxlifetime' 这个设置表示会话的最大生存期(以秒为单位)。

  2. 'session.cookie_lifetime' 这个设置确定会话 cookie 的生存期(以秒为单位)。如果将值设置为 0,那么 cookie 将在浏览器关闭时过期。

英文:

One way to achieve this is by checking and potentially adjusting the php.ini configuration file.

There are two settings in here:

  1. 'session.gc_maxlifetime' This setting represents the maximum lifetime of a session in seconds.

  2. 'session.cookie_lifetime' This setting determines the lifetime of the session cookie in seconds. If the value is set to 0 the cookie will expire when the browser is closed.

huangapple
  • 本文由 发表于 2023年7月12日 23:02:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76671997.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定