@saleemkce opened this Pull Request on April 15th 2015 Contributor

Fix for issue https://github.com/piwik/piwik/issues/7316 Now, no idle user could spend more than 3 days opening the piwik admin panle idle. Added jquery script whic tracks user engagement with the site.

@saleemkce commented on April 15th 2015 Contributor

Additionally, I have given 3 days of inactivity in Piwik admin page as session expiry time. But, we could adjust this based on our collective decision.

\ Possible scenarios when this is most useful,

  • user opens the tab and goes somewhere
  • user has opened the browser tab in the past but never checked the tab again but visits other sites in the browser
  • user accidentally opened the Piwik admin site in another person's place but forgot to close down

Also, it will never auto-expire when user is not idle.

@mattab commented on April 16th 2015 Owner

Hi @saleemkce
what you want to achieve is that user should be logged out after N days of inactivity. To do this we need to do it server side rather than client side. Otherwise if you close the browser and wait 10 days you would still be logged in... the correct way would be to somehow change the Login plugin authentication or so to enforce this maximum of N days.

@saleemkce commented on April 16th 2015 Contributor

Hi @mattab This is the only case which I suppose is not covered in my fix, I have a pure client-side based solution for this case with very little support needed from server-end, I am working in this and will soon publish the fix for the benefit of everyone. Because I don't want to poll (load) the DB periodically with HTTP requests, my solution should be quite unique!

@mahesh978 commented on February 20th 2018

hi i used above solution which you shared but session is not getting expired after sometime.

@saleemkce commented on February 20th 2018 Contributor

@mahesh978 It has been long time since I suggested functionality this PR. I don't have control over this much. But as far as I know, I tested this piece of jquery script and it worked fine. May be it's not loaded correctly in your case. Just copy my code alone and paste it right before closing

@saleemkce commented on February 20th 2018 Contributor

I have created sample HTML page in pastebin to test it for 10 seconds inactive browser tab. Double click the page and switch to another tab. It will redirect to logout page in 10 seconds when idle.

@mahesh978 commented on February 21st 2018

thanks for your reply @saleemkce but still there is no session logout after 15 sec also and alert is also not coming which i added in js.

@mahesh978 commented on February 21st 2018

the same html code is working fine but i think the issue with matomo only

@saleemkce commented on February 21st 2018 Contributor

@mahesh978 "alert is also not coming which i added in js." which denotes that JS is not loaded in your admin site properly. Please try other methods to load the JS. It should work fine then.

@mahesh978 commented on February 22nd 2018

yaa @saleemkce may be file is not getting loaded is there any other way to load js

This Pull Request was closed on April 16th 2015
Powered by GitHub Issue Mirror