Git Product home page Git Product logo

Comments (6)

causefx avatar causefx commented on April 28, 2024

We can just change the session time of the logins, it is currently in the users.php file. I'll see about making it a custom variable.

from organizr.

SgtBatten avatar SgtBatten commented on April 28, 2024

A per user basis would be awesome but if it's just the admin account that can be easily increased or sit indefinitely that would be awesome

from organizr.

grokdesigns avatar grokdesigns commented on April 28, 2024

I found the issue. Currently, the PHPSESSID cookie that gets created has a default lifetime of '0' and is destroyed when the browser closes. So closing the browser completely causes the user to have to log back in when they open it. I added the following to the top of user.php and it now works as I hoped:

$lifetime=86400; // (86400=24 Hours)
$path='/';
$domain='.domain.com';
session_name('organizr_session');
session_start();
setcookie(session_name(),session_id(),time()+$lifetime,$path,$domain);

To match, I also changed, though I'm not sure if this gets renewed every time the page is refreshed.
const time_out = 86400;

It sets the cookie lifetime to 24 hours and renews it whenever the user visits the page. Therefore, they'd have to not visit at all for 24 hours, the cookie would expire, and they'd have to log back in.

from organizr.

causefx avatar causefx commented on April 28, 2024

yea, we are using PHP Session variables instead of Cookies for security reasons.

from organizr.

grokdesigns avatar grokdesigns commented on April 28, 2024

from organizr.

causefx avatar causefx commented on April 28, 2024

I will follow up on this prior to v1.0 :)

from organizr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.