WebSite X5Help Center

 
Duncan Baker
Duncan Baker
User

Automatic logout after a period of time  en

Autor: Duncan Baker
Visited 2221, Followers 1, Udostępniony 0  

I can create a login facility OK - but I would like that to be time expired so that a user is automatically logged out after a certain peiod of time - ideally of no use. Is that possible please? I am buidling a webite where people have to register to view videos (no charge involved) but, if they do not log out on a shared computer, others could come along and view the videos without registering.

Thanks

Posted on the
2 ODPOWIEDZI - 1 PRAWIDłOWA ODPOWIEDź
Paul M.
Paul M.
Moderator

Hello Duncan,

WebSite X5 uses cookies on the server to implement the login/logout feature.  It's possible to customise performance to suit your needs, but note that this must be done in conjunction with your web host, as it's not a feature of WebSite X5 per se.

You need to request that your web host make some changes to your php.ini file as follows:

session.cookie_lifetime = xxxxx

and

session.gc_maxlifetime = xxxxx

where xxxxx equals the number of seconds before the session cookie expires, and your visitor is automatically logged out  -  e.g. if you set this to 86400 then your visitor will be able to browse for a full 24-hour period before having to log in afresh.

Your web host may be unwilling to make such changes on a global basis (as it could impact other sites/users): however, you can put local php.ini files in the root folders of your WebSite X5 projects and achieve the same effect.  The latter is something you can easily do yourself using an FTP client like FileZilla.  If you Google 'php.ini' then you should find lots of useful information and further instructions.

Kind regards,

Paul

Czytaj więcej
Posted on the from Paul M.
Duncan Baker
Duncan Baker
User
Autor

Thanks Paul

Czytaj więcej
Posted on the from Duncan Baker