<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to AutoLogout</title><link>https://sourceforge.net/p/weberp-github/wiki/AutoLogout/</link><description>Recent changes to AutoLogout</description><atom:link href="https://sourceforge.net/p/weberp-github/wiki/AutoLogout/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 15 Oct 2024 09:20:31 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/weberp-github/wiki/AutoLogout/feed" rel="self" type="application/rss+xml"/><item><title>AutoLogout modified by Tim Schofield</title><link>https://sourceforge.net/p/weberp-github/wiki/AutoLogout/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="problem"&gt;Problem&lt;/h1&gt;
&lt;h2 id="automatic-timeout"&gt;Automatic timeout&lt;/h2&gt;
&lt;p&gt;Currently webERP will timeout after a number of seconds. This number is defined by the $SessionLifeTime variable setup in the config.php script. However this doesn't immediately return the user to the login page, just sits there until the user tries to use webERP, and it only then takes them back to the login page. Potentially this is a security problem as anything left on the users screen would be visible to anyone looking at the screen.&lt;/p&gt;
&lt;h2 id="persistant-chosen-module"&gt;Persistant chosen module&lt;/h2&gt;
&lt;p&gt;Also when the user logs back in to webERP they are taken back to the first module in the list, regardless of which module they were last in.&lt;/p&gt;
&lt;h1 id="solution"&gt;Solution&lt;/h1&gt;
&lt;h2 id="automatic-timeout_1"&gt;Automatic timeout&lt;/h2&gt;
&lt;p&gt;This can be solved by inserting the line&lt;/p&gt;
&lt;p&gt;echo '&amp;lt;meta http-equiv="refresh" content="' . (60 * $_SESSION&amp;amp;lt;span&amp;amp;gt;['Timeout']&amp;amp;lt;/span&amp;amp;gt;) . ';url=Logout.php"&amp;gt;';&lt;/p&gt;
&lt;p&gt;into the html headers in the includes/header.php script. This line creates a timeout in seconds (60 * $_SESSION&lt;span&gt;['Timeout']&lt;/span&gt;), and automatically calls the Logout.php script when that timeout interval is reached. $_SESSION&lt;span&gt;['Timeout']&lt;/span&gt; is the interval in minutes, which is defined in the www_users table. Each user can have their own timeout interval set.&lt;/p&gt;
&lt;h2 id="persistant-chosen-module_1"&gt;Persistant chosen module&lt;/h2&gt;
&lt;p&gt;When the user selects a new module, that module is held in a session variable, and then on Logout (whether automatic, or manual) that module is then stored in the database. When the user next logs in (even if not on the same device) that module is retrieved from the database, and the specific module page is loaded.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Tim Schofield</dc:creator><pubDate>Tue, 15 Oct 2024 09:20:31 -0000</pubDate><guid>https://sourceforge.net0b835907e170376b35bbbbb13db02223e4e77227</guid></item></channel></rss>