Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
How to change JSConnect auto logout if user idle for 2 hours?
Johan_Sianipar
New
My JSConnect is working well.
My problem is this, when user idle/do nothing/AFK on my website for 2 hours, they'll logout automatically from website, but unfortunately they don't logout from vanilla forum.
I have done anything, but with no good result.
- I modified define('JS_TIMEOUT', 24 * 60); (at line 10) functions.jsconnect.php, but no luck
- I have tried to modified $Configuration['Garden']['Session']['Length'] = '15 minutes'; (at line 40) config-defaults.php, no luck either
What should i do know?
It's nonsense when they can logout automatically if idle/AFK (away from keyboard) from website, but not from the forum.
I need your help, guys.
Thanks!
0
Comments
Did you not read the top part of that file stating that you should never edit that file ? Or maybe you did not understand what it meant ?
If you need to add or edit a configuration, you must do it in the config.php
I would consider using the same timeout for both ?
Or ask the users to empty their cookies after they leave…
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thankyou for replying, vrijvlinder.
and sorry for edited that config.
Yes, i want to use same timeout like you've said.
In codeigniter, i can set session expiration, $config['sess_expiration'] = [value number whatever i want];
But, where to change the session expiration like codeigniter in Vanilla forum with JSConnect??
You are probably looking for:
SessionExpiry sets how long a standard session cookie lasts. PersisExpiry sets how long a persistent session cookie lasts. You could get rid of the "remember me" box on the form and set both those configs to 2 hours if you would like.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
i've just installed the latest version of forums.
when i look in my config file, there's nothing set for cookie or session
i need to adjust these values. basically i need all users to log out and then log back in because the user ids have changed and its causing havoc with people who are already logged in with their old userid being associated with a different user profile.
can i just insert these lines into my config file?
Changing the cookie salt will effectively log all users out.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
thank you, that worked
What is the value will replace in the cookie salt? It is possible to cron this?