MyBB Central

Full Version: [Request] Login time limit for users / groups
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Another thing I'm looking for is a way to cause users to have a restriction on there login time (like admin have in the ACP). This is because I have a group for people who want "just" to get a look at MyBB (in Hebrew) and I don't want there users to stay logged in (even after they did log out).

(Please note that this was posted in the "MyBB Source" forum - I want as many people to see this and so get, at least, some answers).
Please, if this is at all posible (or not), tell me.

I think you would need to disable the usercp setting for staying logged in. Alter the template so it's not chosen by default and then alter all current users with an sql query.
This will just "throw" everybody "out" if there logged now or clear there status (again - for everybody). What I want is what ACP does to the logged admin - it has a time limit on his/hers logged session. I just want this to a specific group, or (even better) to be able to set each group (and not just the specific one) if I want it to have a time limit and if so, how long should the stay logged until the system asks for a username/password.
I'm, pretty sure, it can be done by changing the cookie MyBB creates. For now the cookie's TTL is "forever", if the cookie is changed for a specific TTL, this should solve it. If there needs to be a code rewrite in any of the MyBB php file - this is ok by me - just tell me where and what.
The thing is that I can never manage to write a code from scratch - I'm a good debugger (as you saw). So, I need your knowledge to get this going.